mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-25 06:10:22 -07:00
Fix any_errors_fatal incorrect implementation in 2.0
Also adds that flag to blocks. Fixes #13744
This commit is contained in:
parent
acf49cf837
commit
1825b4a9c7
5 changed files with 37 additions and 11 deletions
|
@ -151,9 +151,7 @@ class PlaybookExecutor:
|
|||
# conditions are met, we break out, otherwise we only break out if the entire
|
||||
# batch failed
|
||||
failed_hosts_count = len(self._tqm._failed_hosts) + len(self._tqm._unreachable_hosts)
|
||||
if new_play.any_errors_fatal and failed_hosts_count > 0:
|
||||
break
|
||||
elif new_play.max_fail_percentage is not None and \
|
||||
if new_play.max_fail_percentage is not None and \
|
||||
int((new_play.max_fail_percentage)/100.0 * len(batch)) > int((len(batch) - failed_hosts_count) / len(batch) * 100.0):
|
||||
break
|
||||
elif len(batch) == failed_hosts_count:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue