mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 05:42:50 +00:00
Fix inserting noop tasks by using active state (#36056)
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user