group_var usage use var to define next var

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

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 :slight_smile:

Thanks Michael

I will include the error msg next time.