On Wednesday, 14 February 2018 17.07.00 CET Owen Corcoran wrote:
> keepalived_virtual_ip:
>   - vip_details_1:
>     haproxy_vip_name: "AddressCleaner_Development"
>     ip: "1.0.1.2"
>     front_end_port: 80
>     haproxy_backend_servers:
>        - servers_1.1:
>           hostname: system12
>           address: 2.0.0.1
>        - servers_1.2:
>           hostname: system13
>           address: 2.0.0.2
>  

It's not allowed to have . (dot) in variable name only letters, numbers and 
underscores is allowed so servers_1.1: is invalid 


> {% for item in keepalived_virtual_ip %}
> backend {{ item.haproxy_vip_name }}_backend
>     mode tcp
>     balance source
>     {% for backend in item.haproxy_backend_servers %}
>        server {{ backend.hostname }} {{ backend.address }}:{{ 
> haproxy_vip_port }} maxconn 9000 send-proxy check
>     {% endfor %}
> {% endfor %}
>   

Lets say that servers_1.1: is servers_1_1:, the same for server_1.2


item.haproxy_backend_server is a list of dictonary, the hostname is not 
backend.hostname but
backend.servers_1_1.hostname and backend.servers_1_2.hostname


-- 
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/3490142.gy42nNLA3x%40x1.
For more options, visit https://groups.google.com/d/optout.

Reply via email to