Skip to content

Instantly share code, notes, and snippets.

@nivleshc
Created March 12, 2019 04:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nivleshc/e03e1abacd0c2b0e29b00a9a3ac6e0cd to your computer and use it in GitHub Desktop.
Save nivleshc/e03e1abacd0c2b0e29b00a9a3ac6e0cd to your computer and use it in GitHub Desktop.
Piece 5 of Ansible-create-AWS-environment-5.yml
- name: create public subnet in AZ {{ az_in_region.availability_zones[0].zone_name }}
ec2_vpc_subnet:
state: present
cidr: 172.32.1.0/24
az: "{{ az_in_region.availability_zones[0].zone_name }}"
vpc_id: "{{ ansibleVPC.vpc.id }}"
region: "{{ vpc_region }}"
map_public: yes
tags:
Name: public subnet
register: public_subnet
- name: show public subnet details
debug: var=public_subnet
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment