From 6d9f4817eeee6761144344022680ec3e8116e245 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20Gr=C3=BCtzmacher?= Date: Sat, 21 Oct 2023 01:07:54 +0200 Subject: [PATCH] Update example using special variables in resuce section of blocks (#671) * Update example using special variables in resuce section of blocks * Reverted to previous example with linting fixes and corrected variables --- docs/docsite/rst/playbook_guide/playbooks_blocks.rst | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/docsite/rst/playbook_guide/playbooks_blocks.rst b/docs/docsite/rst/playbook_guide/playbooks_blocks.rst index e9a6fcb0820..ecf45cc531b 100644 --- a/docs/docsite/rst/playbook_guide/playbooks_blocks.rst +++ b/docs/docsite/rst/playbook_guide/playbooks_blocks.rst @@ -199,14 +199,14 @@ These can be inspected in the ``rescue`` section: ansible.builtin.command: /bin/false rescue: - name: All is good if the first task failed - when: ansible_failed.task.name == 'Do Something' - debug: - msg: All is good, ignore error as grep could not find 'me' in hosts + when: ansible_failed_task.name == 'Do Something' + ansible.builtin.debug: + msg: All is good, ignore error as grep could not find 'me' in hosts - name: All is good if the first task failed - when: "'/bin/false' in ansible_failed.result.cmd|d([])" - fail: - msg: It is still false!!! + when: "'/bin/false' in ansible_failed_result.cmd | d([])" + ansible.builtin.fail: + msg: It is still false!!! .. note::