Debian Codegraph @

test/integration/targets/gathering_facts/verify_merge_facts.yml

raw
1 - name: rune one and two, verify merge is as expected
2 hosts: localhost
3 vars:
4 ansible_facts_modules:
5 - facts_one
6 - facts_two
7 tasks:
8
9 - name: populate original
10 include_vars:
11 name: original
12 file: one_two.json
13
14 - name: fail if ref file is updated
15 assert:
16 msg: '{{ansible_facts}} vs {{original}}'
17 that:
18 - ansible_facts|to_json(indent=4, sort_keys=True) == original|to_json(indent=4, sort_keys=True)
19
20 - name: clear existing facts for next play
21 meta: clear_facts
22
23
24 - name: rune two and one, verify merge is as expected
25 hosts: localhost
26 vars:
27 ansible_facts_modules:
28 - facts_two
29 - facts_one
30 tasks:
31
32 - name: populate original
33 include_vars:
34 name: original
35 file: two_one.json
36
37 - name: fail if ref file is updated
38 assert:
39 msg: '{{ansible_facts}} vs {{original}}'
40 that:
41 - ansible_facts|to_json(indent=4, sort_keys=True) == original|to_json(indent=4, sort_keys=True)