Skip to content

Instantly share code, notes, and snippets.

@nivleshc
Last active March 12, 2019 04:43
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/abad1bb57591a658da0795984a0aceb2 to your computer and use it in GitHub Desktop.
Save nivleshc/abad1bb57591a658da0795984a0aceb2 to your computer and use it in GitHub Desktop.
Piece 7 of Ansible-create-AWS-environment.yml file
- name: create new route table for public subnet
ec2_vpc_route_table:
state: present
region: "{{ vpc_region }}"
vpc_id: "{{ ansibleVPC.vpc.id }}"
tags:
Name: rt_ansibleVPC_PublicSubnet
subnets:
- "{{ public_subnet.subnet.id }}"
routes:
- dest: 0.0.0.0/0
gateway_id: "{{ ansibleVPC_igw.gateway_id }}"
register: rt_ansibleVPC_PublicSubnet
- name: display public route table
debug: var=rt_ansibleVPC_PublicSubnet
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment