As a follow up, I realize that I made a couple of mistakes in my
original posting. Unfortunately, fixing these mistakes didn't change
the results.

templates/jon.j2 is now

{% for backend in groups['ntpservers_datacenter'] %}
    server {{ inventory_hostname }} {{ backend }}
{% endfor %}


and jon.inv is now

[datacenter]
host1.example.com
host2.example.com

[ntpservers_datacenter]
host1.example.com

Jon

-- 
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/f1c58feb-528a-4c6d-884b-3f3095a63a4e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to