mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-26 04:11:25 -07:00
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:
|
elif state.fail_state != self.FAILED_NONE:
|
||||||
if state.run_state == self.ITERATING_RESCUE and state.fail_state & self.FAILED_RESCUE == 0:
|
if state.run_state == self.ITERATING_RESCUE and state.fail_state & self.FAILED_RESCUE == 0:
|
||||||
return False
|
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
|
return False
|
||||||
else:
|
else:
|
||||||
return not state.did_rescue
|
return not state.did_rescue
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue