Trying to work out why this works:
TASK: [debug var=groups.security_group_app] ***********************************
Friday 17 April 2015 12:15:01 +0100 (0:00:00.301) 0:00:13.586 **********
ok: [52.17.198.95] => {
"var": {
"groups.security_group_app": [
"52.xx.xx.xx",
"52.xx.xx.xx"
]
}
}
But this doesn't:
{% for ec2_host_ip in groups.security_group_app %}
{{ ec2_host_ip|pprint }}
{% endfor %}
fatal: [52.xx.xx.xx] => {'msg': "AnsibleUndefinedVariable: One or more undefined variables: ansible.runner.HostVars object has no element [u'52.xx.xx.xx', u'52.xx.xx.xx']", 'failed': True}