1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Also check the iterator for failed host status in linear strategy

When only looking at the failed state of the TaskResult, certain failures
cause the linear strategy to fail out sooner than it should and not execute
the always portion of blocks.

Fixes #24301
This commit is contained in:
James Cammarata 2017-05-17 09:41:48 -05:00
parent e2c08edfcc
commit f217dae938

View file

@ -399,7 +399,7 @@ class StrategyModule(StrategyBase):
failed_hosts = []
unreachable_hosts = []
for res in results:
if res.is_failed():
if res.is_failed() and iterator.is_failed(res._host):
failed_hosts.append(res._host.name)
elif res.is_unreachable():
unreachable_hosts.append(res._host.name)