From 32f7490a2c841c3162e90712aa5faf4fdbeabda8 Mon Sep 17 00:00:00 2001 From: Sandra McCann Date: Fri, 11 Feb 2022 14:15:12 -0500 Subject: [PATCH] Add note to serial docs (#77006) * add note to serial docs * add keyword directly Fixes #76820 (cherry picked from commit de20f1bae826935f5c3000225aa8db3389d8af8a) --- docs/docsite/rst/user_guide/playbooks_error_handling.rst | 4 +++- docs/docsite/rst/user_guide/playbooks_strategies.rst | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/docsite/rst/user_guide/playbooks_error_handling.rst b/docs/docsite/rst/user_guide/playbooks_error_handling.rst index b906d2f7e88..26142ebad07 100644 --- a/docs/docsite/rst/user_guide/playbooks_error_handling.rst +++ b/docs/docsite/rst/user_guide/playbooks_error_handling.rst @@ -24,6 +24,8 @@ By default Ansible stops executing tasks on a host when a task fails on that hos The ``ignore_errors`` directive only works when the task is able to run and returns a value of 'failed'. It does not make Ansible ignore undefined variable errors, connection failures, execution issues (for example, missing packages), or syntax errors. +.. _ignore_unreachable: + Ignoring unreachable host errors ================================ @@ -145,7 +147,7 @@ Ansible lets you define when a particular task has "changed" a remote node using tasks: - - name: Report 'changed' when the return code is not equal to 2 + - name: Report 'changed' when the return code is not equal to 2 ansible.builtin.shell: /usr/bin/billybass --mode="take me to the river" register: bass_result changed_when: "bass_result.rc != 2" diff --git a/docs/docsite/rst/user_guide/playbooks_strategies.rst b/docs/docsite/rst/user_guide/playbooks_strategies.rst index 8b9d38377b5..43d1605c332 100644 --- a/docs/docsite/rst/user_guide/playbooks_strategies.rst +++ b/docs/docsite/rst/user_guide/playbooks_strategies.rst @@ -105,6 +105,9 @@ In the above example, if we had 6 hosts in the group 'webservers', Ansible would web6 : ok=2 changed=2 unreachable=0 failed=0 +.. note:: + Setting the batch size with ``serial`` changes the scope of the Ansible failures to the batch size, not the entire host list. You can use :ref:`ignore_unreachable ` or :ref:`max_fail_percentage ` to modify this behavior. + You can also specify a percentage with the ``serial`` keyword. Ansible applies the percentage to the total number of hosts in a play to determine the number of hosts per pass: .. code-block:: yaml