I like your yaml template idea, but I did end up pushing the logic off into
my backend.cfg.j2 template:
{% for server in groups['web_servers'] %}
server {{ server }} {{ hostvars[server].ansible_fqdn
}}:{{ hostvars[server].http_port }} params
{% endfor %}
This is based off my current model where role 'haproxy/common' handles the
global and default settings and role 'haproxy/web_servers' handles backend,
frontend and listen settings. This should suffice going forward as long as
other uses of haproxy get their own 'haproxy/other_backend' roles.
--
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/a018f2e2-5ea2-4f8b-bcc7-8394f53da9d3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.