mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 22:02:50 +00:00
Merge pull request #11936 from ringerc/patch-1
Document any_errors_fatal and max_fail_percentage
This commit is contained in:
@@ -103,6 +103,20 @@ does not cause handlers to fire::
|
|||||||
- shell: wall 'beep'
|
- shell: wall 'beep'
|
||||||
changed_when: False
|
changed_when: False
|
||||||
|
|
||||||
|
Aborting the play
|
||||||
|
`````````````````
|
||||||
|
|
||||||
|
Sometimes it's desirable to abort the entire play on failure, not just skip remaining tasks for a host.
|
||||||
|
|
||||||
|
The ``any_errors_fatal`` play option will mark all hosts as failed if any fails, causing an immediate abort.
|
||||||
|
|
||||||
|
- hosts: somehosts
|
||||||
|
any_errors_fatal: true
|
||||||
|
roles:
|
||||||
|
- myrole
|
||||||
|
|
||||||
|
for finer-grained control ``max_fail_percentage`` can be used to abort the run after a given percentage of hosts has failed.
|
||||||
|
|
||||||
|
|
||||||
.. seealso::
|
.. seealso::
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user