I'll give you the first

in app.conf.j2:

{% for host in groups['cluster']%}
{% if loop.counter % 2 == 0 %}
{{ even hosts}}
{% else %}
{{ odd hosts}}
{% endif %}
{% endfor %}

the 2nd one is the same but just extracting the digits from the
hostname and using that instead of loop.counter

-- 
Brian Coca

-- 
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/CAJ5XC8kGUOOsSLK0Gf-R3Og02VxqRDpe5RabfqKNxfJGA4rwfw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to