| create_vpc.yml - ansible-roles - A collection of ansible roles I have created o… | |
| git clone git://jay.scot/ansible-roles | |
| Log | |
| Files | |
| Refs | |
| README | |
| LICENSE | |
| --- | |
| create_vpc.yml (445B) | |
| --- | |
| 1 --- | |
| 2 - name: create VPC | |
| 3 ec2_vpc_net: | |
| 4 cidr_block: "{{ vpc.cidr_block }}" | |
| 5 name: "{{ vpc_name }}" | |
| 6 region: "{{ aws_region }}" | |
| 7 state: present | |
| 8 tenancy: default | |
| 9 register: my_vpc | |
| 10 | |
| 11 - name: set VPC ID in variable | |
| 12 set_fact: | |
| 13 vpc_id: "{{ my_vpc.vpc.id }}" | |
| 14 when: my_vpc.vpc is defined | |
| 15 | |
| 16 - name: create IGW | |
| 17 ec2_vpc_igw: | |
| 18 region: "{{ aws_region }}" | |
| 19 state: present | |
| 20 vpc_id: "{{ my_vpc.vpc.id }}" | |
| 21 register: created_igw |