Clear failed state in always only if we did rescue (#52829)
Fixes #52561
This commit is contained in:
parent
a1ec307d43
commit
f135960fc2
2 changed files with 3 additions and 1 deletions
|
@ -0,0 +1,2 @@
|
|||
bugfixes:
|
||||
- Fix handlers on failed hosts with always section (https://github.com/ansible/ansible/issues/52561)
|
|
@ -484,7 +484,7 @@ class PlayIterator:
|
|||
elif state.fail_state != self.FAILED_NONE:
|
||||
if state.run_state == self.ITERATING_RESCUE and state.fail_state & self.FAILED_RESCUE == 0:
|
||||
return False
|
||||
elif state.run_state == self.ITERATING_ALWAYS and state.fail_state & self.FAILED_ALWAYS == 0:
|
||||
elif state.run_state == self.ITERATING_ALWAYS and state.fail_state & self.FAILED_ALWAYS == 0 and state.did_rescue:
|
||||
return False
|
||||
else:
|
||||
return not state.did_rescue
|
||||
|
|
Loading…
Reference in a new issue