Variable pointer

18 views
Skip to first unread message

Vinicius Leal

unread,
Mar 13, 2017, 8:31:21 PM3/13/17
to Ansible Project
I have following situation
vars: 
    var1: test
    var2: var1
tasks:
   - debug: msg="{{ {{ var2 }} }}"

Exist some syntax to get "test" in debug msg?

Brian Coca

unread,
Mar 22, 2017, 11:42:37 PM3/22/17
to Ansible Project
- debug: msg="{{ hostvars[inventory_hostname][var2] }}"

----------
Brian Coca
Reply all
Reply to author
Forward
0 new messages