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 %}
Which will print the IP address of that host in the template file.
On Mon, Jun 2, 2014 at 9:45 AM, Damjan Georgievski <[email protected]> wrote:
> When deploying an app (on ec2) I need to setup a file with all the redis
> instances the app will use.
>
> But I can't find a way to enumerate all redis instances that I have on AWS
> elasticache.
>
> --
> 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/1931e82d-23f1-4ff6-8129-c7472798887e%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
--
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/CAJQqANcNgtPzwOGGVRE%2BC8RijkkyJf_P0BCFU34tGztRsCq5sQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.