# Var of var in Ansible Playbook

**URL:** <https://forum.ansible.com/t/var-of-var-in-ansible-playbook/22308>\
**Category:** Ansible Project\
**Created:** [August 17, 2016, 2:45pm UTC](https://forum.ansible.com/t/var-of-var-in-ansible-playbook/22308 "2016-08-17T14:45:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Saad](https://avatars.discourse-cdn.com/v4/letter/s/5f9b8f/32.png) [@Saad](https://forum.ansible.com/u/Saad)\
**Post date:** [August 17, 2016, 2:45pm UTC](https://forum.ansible.com/t/var-of-var-in-ansible-playbook/22308/1 "2016-08-17T14:45:26Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Brian\_Coca](https://avatars.discourse-cdn.com/v4/letter/b/6de8d8/32.png) [@Brian\_Coca](https://forum.ansible.com/u/Brian_Coca)\
**Post date:** [February 10, 2017, 3:47am UTC](https://forum.ansible.com/t/var-of-var-in-ansible-playbook/22308/2 "2017-02-10T03:47:19Z")

</div>

mustaches don't stack, just use the var

name : {{ groups[ANOTHER\_VAR\_HERE][0] }}"
