blob: 1aac26e0701395ee7b48dbb323503a24a93529b6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
---
- hosts: all
pre_tasks:
- { include: 'doesnotexist.yml' }
tasks:
- block:
- name: successful debug message
debug: msg='i execute normally'
- name: failure command
command: /bin/false
changed_when: False
- name: never reached debug message
debug: msg='i never execute, cause ERROR!'
rescue:
- name: exception debug message
debug: msg='I caught an error'
- name: another failure command
command: /bin/false
changed_when: False
- name: another missed debug message
debug: msg='I also never execute :-('
always:
- name: always reached debug message
debug: msg="this always executes"
|