Debian Codegraph @

test/integration/targets/handlers/order.yml

raw
1 - name: Test handlers are executed in the order they are defined, not notified
2 hosts: localhost
3 gather_facts: false
4 tasks:
5 - set_fact:
6 foo: ''
7 changed_when: true
8 notify:
9 - handler4
10 - handler3
11 - handler1
12 - handler2
13 - handler5
14 - name: EXPECTED FAILURE
15 fail:
16 when: test_force_handlers | default(false) | bool
17 handlers:
18 - name: handler1
19 set_fact:
20 foo: "{{ foo ~ 1 }}"
21 - name: handler2
22 set_fact:
23 foo: "{{ foo ~ 2 }}"
24 - name: handler3
25 set_fact:
26 foo: "{{ foo ~ 3 }}"
27 - name: handler4
28 set_fact:
29 foo: "{{ foo ~ 4 }}"
30 - name: handler5
31 assert:
32 that:
33 - foo == '1234'
34 fail_msg: "{{ foo }}"