Need to know where we need to write the code for below thing -

23 views
Skip to first unread message

nishant bawane

unread,
Apr 12, 2017, 10:02:37 AM4/12/17
to Ansible Project
I know it is stupid question, but how can I use the beow code in my playbook . Do we need to use any command or shell for this ?

{% for host in groups['app_servers'] %}
   {{ hostvars[host]['ansible_eth0']['ipv4']['address'] }}
{% endfor %}

Brian Coca

unread,
Apr 12, 2017, 9:24:30 PM4/12/17
to Ansible Project
put it in a template and use template module? hard to answer with the
context given.


----------
Brian Coca
Reply all
Reply to author
Forward
0 new messages