Thanks,
You are indeed right about using templates, and we have our principal sites 
using one per needed config.
The thing is that we are making lots of tests on ansible, mostly checking 
for alternate ways to do things, and this just tumbled on us.

By error prone you mean "user-error" prone or "software-error" prone?

We ended up resolving it in this ugly way:

# group_vars
nginx_sites:
  - name: satis
    servers:
      - conf:
          - listen {{satis_port}} ssl spdy;
          - listen [::]:{{satis_port}} ssl spdy;
          - server_name satis;
          - root {{satis_archive_absolute_directory}};
          - index index.html;
          # ...


# template
{% if item.servers is defined %}
{% for server in item.servers %}
server {
{% for line in server.conf %}
  {{ line }}
{% endfor %}
}
{% endfor %}
{% endif %}




-- 
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/04e9cbd9-1ecf-4b06-b099-1c4b5ff2403c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to