mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 22:02:50 +00:00
Don't immediately return failed for any_errors_fatal tasks
Instead of immediately returning a failed code (indicating a break in the play execution), we internally 'or' that failure code with the result (now an integer flag instead of a boolean) so that we can properly handle the rescue/always portions of blocks and still remember that the break condition was hit. Fixes #16937
This commit is contained in:
@@ -147,7 +147,7 @@ class PlaybookExecutor:
|
||||
result = self._tqm.run(play=play)
|
||||
|
||||
# break the play if the result equals the special return code
|
||||
if result == self._tqm.RUN_FAILED_BREAK_PLAY:
|
||||
if result & self._tqm.RUN_FAILED_BREAK_PLAY != 0:
|
||||
result = self._tqm.RUN_FAILED_HOSTS
|
||||
break_play = True
|
||||
|
||||
|
||||
Reference in New Issue
Block a user