Debian Codegraph @

test/integration/targets/delegate_to/resolve_vars.yml

raw
1 ---
2 - name: though we test for 'vars' this is only for backwards compatibility and the 'vars' variable will be deprecated and removed in the future
3 hosts: localhost
4 gather_facts: no
5 tasks:
6 - add_host:
7 name: host1
8 ansible_connection: local
9
10 - hosts: localhost
11 gather_facts: no
12 vars:
13 server_name: host1
14 tasks:
15 - command: echo should delegate to host1 with local connection
16 delegate_to: "{{ vars['server_name'] }}"