Debian Codegraph @

test/integration/targets/cache-plugins/inspect_cache.yml

raw
1 - hosts: localhost
2 gather_facts: no
3 tasks:
4 - name: test that the cache only contains the set_fact var
5 assert:
6 that:
7 - ansible_facts | length == 1
8 - ansible_facts.foo == 'bar'
9 - ansible_facts.foo is ansible._protomatter.tagged_with "Origin"
10 tags:
11 - set_fact
12
13 - name: test that the cache contains gathered facts and the var
14 assert:
15 that:
16 - ansible_facts | length > 1
17 - ansible_facts.foo == 'bar'
18 - ansible_facts.distribution is defined
19 - ansible_facts.foo is ansible._protomatter.tagged_with "Origin"
20 tags:
21 - additive_gather_facts
22
23 - name: test that the cache contains only gathered facts
24 assert:
25 that:
26 - ansible_facts | length > 1
27 - ansible_facts.foo is undefined
28 - ansible_facts.distribution is defined
29 tags:
30 - gather_facts