create stacks with more generic role things
[awsible] / roles / common-infrastructure / tasks / main.yml
1 ---
2 - name: sg ssh
3 delegate_to: localhost
4 become: no
5 ec2_group:
6 vpc_id: "{{ vpc.vpc.id }}"
7 region: "{{ vpc_region }}"
8 state: present
9 name: ssh
10 description: "allow ssh from anywhere"
11 purge_rules: false
12 rules:
13 - proto: tcp
14 from_port: 22
15 to_port: 22
16 cidr_ip: 0.0.0.0/0
17 rules_egress:
18 - proto: all
19 cidr_ip: 0.0.0.0/0
20 register: sg_ssh
21
22 - name: sg icmp
23 delegate_to: localhost
24 become: no
25 ec2_group:
26 vpc_id: "{{ vpc.vpc.id }}"
27 region: "{{ vpc_region }}"
28 state: present
29 name: icmp
30 description: "allow icmp from anywhere"
31 purge_rules: false
32 rules:
33 - proto: icmp
34 from_port: -1
35 to_port: -1
36 cidr_ip: 0.0.0.0/0
37 rules_egress:
38 - proto: all
39 cidr_ip: 0.0.0.0/0
40 register: sg_icmp