Debian Codegraph @

test/integration/targets/delegate_to/delegate_facts_block.yml

raw
1 - hosts: testhost
2 gather_facts: false
3 tasks:
4 - name: set var to delegated host directly
5 set_fact: qq1=333
6 delegate_facts: true
7 delegate_to: localhost
8
9 - name: ensure qq1 exists in localhost but not in testhost
10 assert:
11 that:
12 - qq1 is undefined
13 - "'qq1' in hostvars['localhost']"
14
15 - name: set var to delegated host via inheritance
16 block:
17 - set_fact: qq2=333
18 delegate_facts: true
19 delegate_to: localhost
20
21 - name: ensure qq2 exists in localhost but not in testhost
22 assert:
23 that:
24 - qq2 is undefined
25 - "'qq2' in hostvars['localhost']"