split infrastructure further
authorJustin Wind <j.wind@partner.samsung.com>
Fri, 10 Mar 2017 22:04:49 +0000 (14:04 -0800)
committerJustin Wind <j.wind@partner.samsung.com>
Fri, 10 Mar 2017 22:04:49 +0000 (14:04 -0800)
roles/aws-management-infrastructure/meta/main.yml
roles/aws-management-infrastructure/tasks/main.yml
roles/common-infrastructure/meta/main.yml [new file with mode: 0644]
roles/common-infrastructure/tasks/main.yml [new file with mode: 0644]

index f4f0c2af8e552ccfb9c960145d8d517d3f78b802..381b3527d99a07aceeee8f720f513b85843d99a2 100644 (file)
@@ -1,3 +1,4 @@
 ---
 dependencies:
   - { role: aws-management-queues }
+  - { role: common-infrastructure }
index 512f229890fabef2bf9cd3accd599fac73807538..d0edb77bbf20cb4c439e5e510fc474c981ac4ab2 100644 (file)
@@ -5,24 +5,6 @@
     - DEFAULT_AMI != ''
   tags: ['check_vars']
 
-- name: sg ssh
-  ec2_group:
-    vpc_id: "{{ vpc.vpc.id }}"
-    region: "{{ vpc_region }}"
-    state: present
-    name: ssh
-    description: "allow ssh from anywhere"
-    purge_rules: false
-    rules:
-    - proto: tcp
-      from_port: 22
-      to_port: 22
-      cidr_ip: 0.0.0.0/0
-    rules_egress:
-    - proto: all
-      cidr_ip: 0.0.0.0/0
-  register: sg_ssh
-
 - name: sg management-elb
   ec2_group:
     vpc_id: "{{ vpc.vpc.id }}"
diff --git a/roles/common-infrastructure/meta/main.yml b/roles/common-infrastructure/meta/main.yml
new file mode 100644 (file)
index 0000000..279092d
--- /dev/null
@@ -0,0 +1,3 @@
+---
+dependencies:
+  - { role: aws-vpc }
diff --git a/roles/common-infrastructure/tasks/main.yml b/roles/common-infrastructure/tasks/main.yml
new file mode 100644 (file)
index 0000000..6d40a64
--- /dev/null
@@ -0,0 +1,18 @@
+---
+- name: sg ssh
+  ec2_group:
+    vpc_id: "{{ vpc.vpc.id }}"
+    region: "{{ vpc_region }}"
+    state: present
+    name: ssh
+    description: "allow ssh from anywhere"
+    purge_rules: false
+    rules:
+    - proto: tcp
+      from_port: 22
+      to_port: 22
+      cidr_ip: 0.0.0.0/0
+    rules_egress:
+    - proto: all
+      cidr_ip: 0.0.0.0/0
+  register: sg_ssh