diff options
Diffstat (limited to 'test/integration/targets/delegate_to/delegate_facts_block.yml')
-rw-r--r-- | test/integration/targets/delegate_to/delegate_facts_block.yml | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/test/integration/targets/delegate_to/delegate_facts_block.yml b/test/integration/targets/delegate_to/delegate_facts_block.yml new file mode 100644 index 0000000..2edfeb4 --- /dev/null +++ b/test/integration/targets/delegate_to/delegate_facts_block.yml @@ -0,0 +1,25 @@ +- hosts: testhost + gather_facts: false + tasks: + - name: set var to delegated host directly + set_fact: qq1=333 + delegate_facts: true + delegate_to: localhost + + - name: ensure qq1 exists in localhost but not in testhost + assert: + that: + - qq1 is undefined + - "'qq1' in hostvars['localhost']" + + - name: set var to delegated host via inheritance + block: + - set_fact: qq2=333 + delegate_facts: true + delegate_to: localhost + + - name: ensure qq2 exists in localhost but not in testhost + assert: + that: + - qq2 is undefined + - "'qq2' in hostvars['localhost']" |