Skip to content

Commit c20684c

Browse files
committed
unreachable hosts do not execute the always section either
1 parent 86e40df commit c20684c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

docs/docsite/rst/playbook_guide/playbooks_blocks.rst

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,11 @@ Handling errors with blocks
5858

5959
You can control how Ansible responds to task errors using blocks with ``rescue`` and ``always`` sections.
6060

61-
Rescue blocks specify tasks to run when an earlier task in a block fails. This approach is similar to exception handling in many programming languages. Ansible only runs rescue blocks after a task returns a 'failed' state. Bad task definitions and unreachable hosts will not trigger the rescue block.
61+
.. note::
62+
63+
Errors caused by bad task definitions and unreachable hosts do not trigger the ``rescue`` or ``always`` sections of a block.
64+
65+
Rescue blocks specify tasks to run when an earlier task in a block fails. This approach is similar to exception handling in many programming languages. Ansible only runs rescue blocks after a task returns a 'failed' state.
6266

6367
.. _block_rescue:
6468
.. code-block:: YAML

0 commit comments

Comments
 (0)