ansible
aws
vpc
6 years, 6 months ago
---
- name: Create/Delete VPC
ec2_vpc:
wait: true
state: "{{ item.state }}"
cidr_block: "{{ item.cidr_block }}"
resource_tags: { "Name": "{{ item.vpc_name }}", "Tag": "{{ item.tag | default('none') }}" }
region: "{{ item.region }}"
internet_gateway: yes
subnets:
- cidr: "{{ item.default_subnet }}"
resource_tags: { "Name":"subnet" }
route_tables:
- subnets:
- "{{ item.default_subnet }}"
routes:
- dest: 0.0.0.0/0
gw: igw
with_items: "{{ vpcs }}"
register: result_vpc
0 Comments
Please Login to Comment Here