TASK [Create required security groups] ******************************************************************************************************************************
fatal: [localhost]: FAILED! => {}
MSG:
The task includes an option with an undefined variable. The error was: 'ansible.utils.unsafe_proxy.AnsibleUnsafeText object' has no attribute 'name'
The error appears to have been in '/Users/chrome/Development/ansible/nathan-aws-environment/provision.yml': line 14, column 5, but may
be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
- debug: var=security_groups
- name: "Create required security groups"
^ here
exception type: <class 'ansible.errors.AnsibleUndefinedVariable'>
exception: 'ansible.utils.unsafe_proxy.AnsibleUnsafeText object' has no attribute 'name'
The fix is to edit the provision.yml and modify the "with_items:" attributes to use "{{ xxxxx }}" for the security_groups and ec2_instances vars.