I have a rule like this:
- name: Create user
mysql_user: name=app
host=={{ item }}
...
with_items:
- localhost
- 127.0.0.1
- "{{ groups['webservers'] }}"
# - <here I want to list ip numbers of the webservers group>
How can I make the list include IP numbers of each webserver host. I know I
can use ansible_eth0.ipv4.address to map from hostname to IP, but I don't
know how to map a whole list to another list. And I can't see any way to
define a variable as the result of a loop.
--
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/9821a9c0-b62b-4e50-bfe7-10559124ebb6%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.