From 68c71ecba894262883d42dbbea4e8b8c54c71879 Mon Sep 17 00:00:00 2001 From: Craig Ringer Date: Wed, 12 Aug 2015 17:48:42 +0800 Subject: [PATCH] Document any_errors_fatal and max_fail_percentage --- docsite/rst/playbooks_error_handling.rst | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/docsite/rst/playbooks_error_handling.rst b/docsite/rst/playbooks_error_handling.rst index ac573d86ba..fb12990b3f 100644 --- a/docsite/rst/playbooks_error_handling.rst +++ b/docsite/rst/playbooks_error_handling.rst @@ -103,6 +103,20 @@ does not cause handlers to fire:: - shell: wall 'beep' 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::