mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-24 19:31:26 -07:00
Tweak how strategies evaluate failed hosts via the iterator and bug fixes
* Added additional methods to the iterator code to assess host failures while also taking into account the block rescue/always states * Fixed bugs in the free strategy, where results were not always being processed after being collected * Added some prettier printing to the state output from iterator Fixes #13699
This commit is contained in:
parent
6f2f7a79b3
commit
210cf06d9a
3 changed files with 49 additions and 14 deletions
|
@ -54,7 +54,8 @@ class StrategyModule(StrategyBase):
|
|||
host_tasks = {}
|
||||
display.debug("building list of next tasks for hosts")
|
||||
for host in hosts:
|
||||
host_tasks[host.name] = iterator.get_next_task_for_host(host, peek=True)
|
||||
if not iterator.is_failed(host):
|
||||
host_tasks[host.name] = iterator.get_next_task_for_host(host, peek=True)
|
||||
display.debug("done building task lists")
|
||||
|
||||
num_setups = 0
|
||||
|
@ -98,7 +99,7 @@ class StrategyModule(StrategyBase):
|
|||
rvals = []
|
||||
display.debug("starting to advance hosts")
|
||||
for host in hosts:
|
||||
host_state_task = host_tasks[host.name]
|
||||
host_state_task = host_tasks.get(host.name)
|
||||
if host_state_task is None:
|
||||
continue
|
||||
(s, t) = host_state_task
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue