up vote
down votefavorite 
<http://stackoverflow.com/questions/43547313/in-ansible-how-do-i-use-a-variable-in-an-inventory-file-in-a-template#>

I have this inventory file

inventory/hosts_elk

[elk-client-0]
10.11.22.22

Now I have a template, and I want to do this

elk_server.yml.j2

elk_server = {{ elk-client-0 }}

But that doesn't work, that is the value for {{ elk-client-0 }} does NOT 
get substituted.

What is the correct syntax so when the template gets laid out on the 
server, the resulting file looks like

elk_server = 10.11.22.22


-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/06b4ebff-9b5a-42c7-8618-214fb70f78b5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to