blob: d2144024382da9fe95c49041e9de6dfee941bb16 (
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
- name: rune one and two, verify merge is as expected
hosts: localhost
vars:
ansible_facts_modules:
- facts_one
- facts_two
tasks:
- name: populate original
include_vars:
name: original
file: one_two.json
- name: fail if ref file is updated
assert:
msg: '{{ansible_facts}} vs {{original}}'
that:
- ansible_facts|to_json(indent=4, sort_keys=True) == original|to_json(indent=4, sort_keys=True)
- name: clear existing facts for next play
meta: clear_facts
- name: rune two and one, verify merge is as expected
hosts: localhost
vars:
ansible_facts_modules:
- facts_two
- facts_one
tasks:
- name: populate original
include_vars:
name: original
file: two_one.json
- name: fail if ref file is updated
assert:
msg: '{{ansible_facts}} vs {{original}}'
that:
- ansible_facts|to_json(indent=4, sort_keys=True) == original|to_json(indent=4, sort_keys=True)
|