Skip to content

Instantly share code, notes, and snippets.

@jeremypruitt
Created September 27, 2014 22:10
Show Gist options
  • Save jeremypruitt/d973fabe87c3a57a6d8c to your computer and use it in GitHub Desktop.
Save jeremypruitt/d973fabe87c3a57a6d8c to your computer and use it in GitHub Desktop.
Loop over AWS hosts in a jinja2 template with Ansible
{% for host in hosts['tag_Name_' + application.name + '-' + Version %}
IP: {{ hostvars[host] }}
{% endfor %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment