Skip to content

Commit

Permalink
Also check the iterator for failed host status in linear strategy
Browse files Browse the repository at this point in the history
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 ansible#24301
  • Loading branch information
jimi-c committed May 17, 2017
1 parent e2c08ed commit f217dae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/ansible/plugins/strategy/linear.py
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ def run(self, iterator, play_context):
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)
Expand Down

0 comments on commit f217dae

Please sign in to comment.