mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-10-06 00:14:02 -07:00
Fix inserting noop tasks by using active state (#36056)
This commit is contained in:
parent
8be3924d4e
commit
77e2bd5f8e
2 changed files with 186 additions and 1 deletions
|
@ -113,7 +113,7 @@ class StrategyModule(StrategyBase):
|
|||
if host_tasks_to_run:
|
||||
try:
|
||||
lowest_cur_block = min(
|
||||
(s.cur_block for h, (s, t) in host_tasks_to_run
|
||||
(iterator.get_active_state(s).cur_block for h, (s, t) in host_tasks_to_run
|
||||
if s.run_state != PlayIterator.ITERATING_COMPLETE))
|
||||
except ValueError:
|
||||
lowest_cur_block = None
|
||||
|
@ -125,6 +125,7 @@ class StrategyModule(StrategyBase):
|
|||
for (k, v) in host_tasks_to_run:
|
||||
(s, t) = v
|
||||
|
||||
s = iterator.get_active_state(s)
|
||||
if s.cur_block > lowest_cur_block:
|
||||
# Not the current block, ignore it
|
||||
continue
|
||||
|
@ -158,6 +159,7 @@ class StrategyModule(StrategyBase):
|
|||
if host_state_task is None:
|
||||
continue
|
||||
(s, t) = host_state_task
|
||||
s = iterator.get_active_state(s)
|
||||
if t is None:
|
||||
continue
|
||||
if s.run_state == cur_state and s.cur_block == cur_block:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue