# group\_var usage use var to define next var

**URL:** <https://forum.ansible.com/t/group-var-usage-use-var-to-define-next-var/13433>\
**Category:** Ansible Project\
**Created:** [September 8, 2013, 3:27pm UTC](https://forum.ansible.com/t/group-var-usage-use-var-to-define-next-var/13433 "2013-09-08T15:27:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Eric\_Palmer1](https://avatars.discourse-cdn.com/v4/letter/e/958977/32.png) [@Eric\_Palmer1](https://forum.ansible.com/u/Eric_Palmer1)\
**Post date:** [September 8, 2013, 3:27pm UTC](https://forum.ansible.com/t/group-var-usage-use-var-to-define-next-var/13433/1 "2013-09-08T15:27:39Z")

</div>

I’m getting and error on the 2nd line

bitnami\_home: /opt/bitnami  
httpd\_conf\_home: {{ bitnami\_home }}/apache2/conf

In a group\_var file. Is it possible to make this sort of compund construction possible?

thanks

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan2](https://avatars.discourse-cdn.com/v4/letter/m/da6949/32.png) [@Michael\_DeHaan2](https://forum.ansible.com/u/Michael_DeHaan2)\
**Post date:** [September 8, 2013, 3:34pm UTC](https://forum.ansible.com/t/group-var-usage-use-var-to-define-next-var/13433/2 "2013-09-08T15:34:04Z")

</div>

If you start a line with {{ you need to quote the line, as YAML things you are starting a hash. http\_conf\_home: “{{ bitnami\_home }}/foo”

This is covered in the YAML syntax page and you should be seeing that the error came from YAML vs Ansible.

We have discussed pre-processing things and presenting clearer messages about this, which is in queue for future developments in 1.4/later

BTW, general forum tip for everyone, if you have an “error”, please post what the error actually is. Goes a long way to understanding things for me and others, and saves cycles from not having to ask 🙂

---

<div class="post-metadata">

**Author:** ![Eric\_Palmer1](https://avatars.discourse-cdn.com/v4/letter/e/958977/32.png) [@Eric\_Palmer1](https://forum.ansible.com/u/Eric_Palmer1)\
**Post date:** [September 8, 2013, 3:43pm UTC](https://forum.ansible.com/t/group-var-usage-use-var-to-define-next-var/13433/3 "2013-09-08T15:43:31Z")

</div>

Thanks Michael

I will include the error msg next time.
