If you have a redis group of servers you can do something like:
{% for host in groups['redis'] %}
{{ hostvars[host].ansible_default_ipv4.address }}
{% endfor %}
--
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-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/9cd24067-ecb2-469c-b967-6788334233e2%40googlegroups.com.
While there are probably other suggestions people would offer up, I'd probably consider tagging your redis machines "redis", that way it will automatically make a group of them, and they will be easier to manage.