Debian Codegraph @

test/integration/targets/roles/end_role.yml

raw
1 - hosts: localhost,testhost
2 gather_facts: false
3 pre_tasks:
4 - set_fact:
5 play_checkpoint: 1
6 roles:
7 - end_role_inside
8 tasks:
9 - set_fact:
10 play_checkpoint: "{{ play_checkpoint|int + 1 }}"
11
12 - import_role:
13 name: end_role_inside
14 allow_duplicates: true
15
16 - set_fact:
17 play_checkpoint: "{{ play_checkpoint|int + 1 }}"
18
19 - include_role:
20 name: end_role_inside
21 allow_duplicates: false
22
23 - set_fact:
24 play_checkpoint: "{{ play_checkpoint|int + 1 }}"
25 post_tasks:
26 - assert:
27 that:
28 - role_executed|int == 2
29 - after_end_role is undefined
30 - play_checkpoint|int == 4
31 - role_handler_ran is defined
32
33 - name: when running this playbook check this appears on stdout to ensure the above assert wasn't skipped
34 debug:
35 msg: CHECKPOINT