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