Var of var in Ansible Playbook

22 views
Skip to first unread message

Saad

unread,
Aug 18, 2016, 12:41:27 PM8/18/16
to Ansible Project

Hello,
i try to do a var of var in a playbook on Ansible but i can't figure out how to do this proprly, or if it is even possible ?
here is what i try to do : 
"name : {{ groups['{{ ANOTHER_VAR_HERE }}'][0] }}"
Ansible --version : ansible 2.1.0.0


PS : ANOTHER_VAR_HERE its a variable that i include from a vars file (its not a String its a real variable)


Thank you

Brian Coca

unread,
Feb 9, 2017, 10:47:30 PM2/9/17
to Ansible Project
mustaches don't stack, just use the var

name : {{ groups[ANOTHER_VAR_HERE][0] }}"


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