On 23. mai 2017 20:30, Owen Corcoran wrote:
Hi Guys,
Im trying to get my ansible script to use the below for loop to populate a
configfile template generated from Jinja2.
The line i cant get working is
{% for hostname in {{ redishosts }} %}
You can't use {{ and }} in between {% %}, so just remove them.
server "{{ hostname }}" {{
hostvars[host]['ansible_eth0']['ipv4']['address'] }} check port 6379 inter
I guess it's hostname and not host.
--
Kai Stian Olstad
--
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/01904856-0751-9411-270c-adad80880fce%40olstad.com.
For more options, visit https://groups.google.com/d/optout.