mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-08-23 06:21:43 -07:00
Revert Clear failed state in always only if we did rescue (#52968)
* Revert "Clear failed state in always only if we did rescue (#52829)"
This reverts commit f135960fc2
.
* Add tests for failed scenario
* Set failed task with EXPECTED FAILURE
This commit is contained in:
parent
344a81daec
commit
d55ddec923
5 changed files with 23 additions and 3 deletions
|
@ -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 and state.did_rescue:
|
||||
elif state.run_state == self.ITERATING_ALWAYS and state.fail_state & self.FAILED_ALWAYS == 0:
|
||||
return False
|
||||
else:
|
||||
return not state.did_rescue
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue