Debian Codegraph @

test/integration/targets/strategy_host_pinned/playbook.yml

raw
1 # README - even the name of the tasks matter in this test, see callback_plugins/callback_host_count.py
2 - hosts: all
3 gather_facts: false
4 strategy: host_pinned
5 pre_tasks:
6 # by executing in pre_tasks we ensure that "start" is the first task in the play,
7 # not an implicit "meta: flush_handlers" after pre_tasks
8 - name: start
9 debug:
10 msg: start
11
12 - ping:
13
14 - meta: noop
15 post_tasks:
16 # notifying a handler in post_tasks ensures the handler is the last task in the play,
17 # not an implicit "meta: flush_handlers" after post_tasks
18 - debug:
19 changed_when: true
20 notify: end
21 handlers:
22 - name: end
23 debug:
24 msg: end
25
26 - hosts: localhost0,localhost1,localhost2
27 gather_facts: false
28 strategy: host_pinned
29 pre_tasks:
30 - name: start
31 debug:
32 msg: start
33
34 - command: sleep 3
35 when: inventory_hostname == "localhost0"
36
37 - meta: noop
38 - meta: noop
39 post_tasks:
40 - debug:
41 changed_when: true
42 notify: end
43 handlers:
44 - name: end
45 debug:
46 msg: end