Created
March 12, 2015 16:35
-
-
Save pixie79/8cf1bb0a56c451fde7cd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% for x in groups['elasticsearch_masters'] %} | |
- name: {{ x }} | |
container_ip: "172.16.7.7" | |
{% endfor %} |
then your set_fact is
set_fact: somevar={{ lookup... }}
and debug: var=somevar should show
{
foo.example.com: 172.16.7.1,
bob.example.com: 172.16.7.2,
}
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
create a dict
{
{% for x in groups['...'] %}
{{ x }}:'172.16.7.{{ loop.index }}',
{% endfor %}
}