On 14.02.2018 21:54, Owen Corcoran wrote:
Could i have instead of :


Servers_1.1
Servers_1.2
Servers_2.1
Servers_2.2
Servers_3.1
Servers_3.2


Call each list

servers

The easiest to do is make haproxy_backend_servers a list of dictionaries and not a list of dictionary.

So if you can change you haproxy_backend_servers to

    haproxy_backend_servers:
      - name: servers_1.1
        hostname: system12
        address: 2.0.0.1
      - name: servers_1.2:
        hostname: system13
        address: 2.0.0.2

You code will work as is since you can call backend.hostname and not backend.<something>.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 ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/6cd57575dff4773a6549c065f7c573de%40olstad.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to