2

What do skipped, rescued, and ignored results mean in an Ansible playbook execution? What would be a possible scenario where these results would be different from 0?

PLAY RECAP ******************************************************************* localhost: ok=3 changed=1 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 
2
  • could you please provide a text version of the screenshot, making it easier to read and more accessible? thanks! Commented Aug 18, 2021 at 9:11
  • I did it. Thank you for having pointed to that. Commented Aug 18, 2021 at 9:20

1 Answer 1

5

For example, the play below

- hosts: localhost tasks: - name: Task will be SKIPPED debug: msg: You will never see this message. when: false - name: Failed command will be IGNORED command: /usr/bin/false ignore_errors: true - name: Failed command will be RESCUED block: - command: /usr/bin/false rescue: - debug: msg: "{{ ansible_failed_result }}" 

gives

PLAY RECAP ******************************************************************* localhost: ok=2 changed=1 unreachable=0 failed=0 skipped=1 rescued=1 ignored=1 

For details see

Briefly, an error is ignored when you set ignore_errors: true. This can be set on multiple levels. See Playbook Keywords. If you use block/rescue you can actively handle the consequences of the error.

1
  • Thank you very much. Very clear now to me. Commented Aug 20, 2021 at 3:15

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.