Skip to content

Commit

Permalink
Update example using special variables in resuce section of blocks (#671
Browse files Browse the repository at this point in the history
)

* Update example using special variables in resuce section of blocks

* Reverted to previous example with linting fixes and corrected variables
  • Loading branch information
TimGrt authored Oct 20, 2023
1 parent 3297187 commit 6d9f481
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions docs/docsite/rst/playbook_guide/playbooks_blocks.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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::

Expand Down

0 comments on commit 6d9f481

Please sign in to comment.