do dependant infrastructure tasks on non-root localhost
[awsible] / roles / aws-vpc / tasks / main.yml
1 ---
2 - assert:
3 that:
4 - vpc_name != ''
5 - vpc_cidr != ''
6 - vpc_region != ''
7 tags: ['check_vars']
8
9 - name: VPC
10 delegate_to: localhost
11 become: no
12 ec2_vpc_net:
13 state: present
14 name: "{{ vpc_name }}"
15 cidr_block: "{{ vpc_cidr }}"
16 region: "{{ vpc_region }}"
17 register: vpc