mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-10-06 00:14:02 -07:00
Fix triggering parent's always with run_once set (#35464)
This commit is contained in:
parent
2293252e52
commit
7c83f006c0
2 changed files with 16 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue