Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Piece 4 of Ansible-create-AWS-environment-4.yml file
- name: obtain all AZ present in region {{ vpc_region }}
region: "{{ vpc_region }}"
register: az_in_region
- name: display all AZ present in region {{ vpc_region }}
debug: var=az_in_region
#create public subnet in first az and private subnet in second az
- name: display AZ that will be used for public and private Subnets
- "public subnet in AZ: {{ az_in_region.availability_zones[0].zone_name }}"
- "private subnet in AZ: {{ az_in_region.availability_zones[1].zone_name }}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.