summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMartin Krizek <martin.krizek@gmail.com>2018-01-30 13:16:19 +0100
committerGitHub <noreply@github.com>2018-01-30 13:16:19 +0100
commit7c83f006c0bd77e9288388d7de62cee6cf10d5ee (patch)
tree86d3a3050a09e5653770b20be0e1bac60dff1887 /lib
parent2293252e529d4708c76ed2dc0dc60d7834a3eec9 (diff)
downloadansible-7c83f006c0bd77e9288388d7de62cee6cf10d5ee.tar.gz
Fix triggering parent's always with run_once set (#35464)
Diffstat (limited to 'lib')
-rw-r--r--lib/ansible/plugins/strategy/linear.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/ansible/plugins/strategy/linear.py b/lib/ansible/plugins/strategy/linear.py
index 9bdc1274f4..3409888fa0 100644
--- a/lib/ansible/plugins/strategy/linear.py
+++ b/lib/ansible/plugins/strategy/linear.py
@@ -389,9 +389,10 @@ class StrategyModule(StrategyBase):
# if any_errors_fatal and we had an error, mark all hosts as failed
if any_errors_fatal and (len(failed_hosts) > 0 or len(unreachable_hosts) > 0):
+ dont_fail_states = frozenset([iterator.ITERATING_RESCUE, iterator.ITERATING_ALWAYS])
for host in hosts_left:
(s, _) = iterator.get_next_task_for_host(host, peek=True)
- if s.run_state != iterator.ITERATING_RESCUE or \
+ if s.run_state not in dont_fail_states or \
s.run_state == iterator.ITERATING_RESCUE and s.fail_state & iterator.FAILED_RESCUE != 0:
self._tqm._failed_hosts[host.name] = True
result |= self._tqm.RUN_FAILED_BREAK_PLAY