summaryrefslogtreecommitdiffstats
path: root/roles/openshift_aws/tasks/security_group_create.yml
diff options
context:
space:
mode:
authorKenny Woodson <kwoodson@redhat.com>2017-10-28 20:46:44 -0400
committerKenny Woodson <kwoodson@redhat.com>2017-11-08 10:01:08 -0500
commit8757073d8509a6301b70ff66383d84416bdd78cb (patch)
treec4eef61dc19e5dc80a3b1b159b2b9f5e72ba826b /roles/openshift_aws/tasks/security_group_create.yml
parentadb5c51666dfe7c6b93c7bd7c87b339ef2a27f5b (diff)
downloadopenshift-8757073d8509a6301b70ff66383d84416bdd78cb.tar.gz
openshift-8757073d8509a6301b70ff66383d84416bdd78cb.tar.bz2
openshift-8757073d8509a6301b70ff66383d84416bdd78cb.tar.xz
openshift-8757073d8509a6301b70ff66383d84416bdd78cb.zip
Bootstrap enhancements.
Diffstat (limited to 'roles/openshift_aws/tasks/security_group_create.yml')
-rw-r--r--roles/openshift_aws/tasks/security_group_create.yml25
1 files changed, 25 insertions, 0 deletions
diff --git a/roles/openshift_aws/tasks/security_group_create.yml b/roles/openshift_aws/tasks/security_group_create.yml
new file mode 100644
index 000000000..ef6060555
--- /dev/null
+++ b/roles/openshift_aws/tasks/security_group_create.yml
@@ -0,0 +1,25 @@
+---
+- name: create the node group sgs
+ ec2_group:
+ name: "{{ item.value.name}}"
+ description: "{{ item.value.desc }}"
+ rules: "{{ item.value.rules if 'rules' in item.value else [] }}"
+ region: "{{ openshift_aws_region }}"
+ vpc_id: "{{ vpcout.vpcs[0].id }}"
+ with_dict: "{{ l_security_groups }}"
+
+- name: create the k8s sgs for the node group
+ ec2_group:
+ name: "{{ item.value.name }}_k8s"
+ description: "{{ item.value.desc }} for k8s"
+ region: "{{ openshift_aws_region }}"
+ vpc_id: "{{ vpcout.vpcs[0].id }}"
+ with_dict: "{{ l_security_groups }}"
+ register: k8s_sg_create
+
+- name: tag sg groups with proper tags
+ ec2_tag:
+ tags: "{{ openshift_aws_security_groups_tags }}"
+ resource: "{{ item.group_id }}"
+ region: "{{ openshift_aws_region }}"
+ with_items: "{{ k8s_sg_create.results }}"