You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/docsite/rst/playbook_guide/playbooks_blocks.rst
+5-1Lines changed: 5 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -58,7 +58,11 @@ Handling errors with blocks
58
58
59
59
You can control how Ansible responds to task errors using blocks with ``rescue`` and ``always`` sections.
60
60
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.
0 commit comments