Clear failed state in always only if we did rescue (#52829)

Fixes #52561
pull/52946/head
Martin Krizek 6 years ago committed by GitHub
parent a1ec307d43
commit f135960fc2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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…
Cancel
Save