summaryrefslogtreecommitdiffstats
path: root/roles/openshift_aws/tasks/security_group.yml
diff options
context:
space:
mode:
authorClayton Coleman <ccoleman@redhat.com>2017-11-05 01:25:30 -0400
committerGitHub <noreply@github.com>2017-11-05 01:25:30 -0400
commitbbea54dca12e8796764629b88c1faf596b2f5840 (patch)
treea577663c65a6eba7ec60e00e2ae0e023359e143e /roles/openshift_aws/tasks/security_group.yml
parent76f4f47c2fac8f2c1df8bf300069116f0dcfbf0e (diff)
parent858afb085dab78018f90ff17871b83c1dd9ba5bd (diff)
downloadopenshift-bbea54dca12e8796764629b88c1faf596b2f5840.tar.gz
openshift-bbea54dca12e8796764629b88c1faf596b2f5840.tar.bz2
openshift-bbea54dca12e8796764629b88c1faf596b2f5840.tar.xz
openshift-bbea54dca12e8796764629b88c1faf596b2f5840.zip
Merge pull request #6015 from openshift/revert-6006-elb-v2
Revert "Bootstrap enhancements."
Diffstat (limited to 'roles/openshift_aws/tasks/security_group.yml')
-rw-r--r--roles/openshift_aws/tasks/security_group.yml42
1 files changed, 35 insertions, 7 deletions
diff --git a/roles/openshift_aws/tasks/security_group.yml b/roles/openshift_aws/tasks/security_group.yml
index 5cc7ae537..e1fb99b02 100644
--- a/roles/openshift_aws/tasks/security_group.yml
+++ b/roles/openshift_aws/tasks/security_group.yml
@@ -6,11 +6,39 @@
"tag:Name": "{{ openshift_aws_clusterid }}"
register: vpcout
-- include: security_group_create.yml
- vars:
- l_security_groups: "{{ openshift_aws_node_security_groups }}"
+- name: Create default security group for cluster
+ ec2_group:
+ name: "{{ openshift_aws_node_security_groups.default.name }}"
+ description: "{{ openshift_aws_node_security_groups.default.desc }}"
+ region: "{{ openshift_aws_region }}"
+ vpc_id: "{{ vpcout.vpcs[0].id }}"
+ rules: "{{ openshift_aws_node_security_groups.default.rules | default(omit, True)}}"
+ register: sg_default_created
+
+- name: create the node group sgs
+ ec2_group:
+ name: "{{ item.name}}"
+ description: "{{ item.desc }}"
+ rules: "{{ item.rules if 'rules' in item else [] }}"
+ region: "{{ openshift_aws_region }}"
+ vpc_id: "{{ vpcout.vpcs[0].id }}"
+ register: sg_create
+ with_items:
+ - "{{ openshift_aws_node_security_groups[openshift_aws_node_group_type]}}"
-- include: security_group_create.yml
- when: openshift_aws_node_security_groups_extra is defined
- vars:
- l_security_groups: "{{ openshift_aws_node_security_groups_extra | default({}) }}"
+- name: create the k8s sgs for the node group
+ ec2_group:
+ name: "{{ item.name }}_k8s"
+ description: "{{ item.desc }} for k8s"
+ region: "{{ openshift_aws_region }}"
+ vpc_id: "{{ vpcout.vpcs[0].id }}"
+ register: k8s_sg_create
+ with_items:
+ - "{{ openshift_aws_node_security_groups[openshift_aws_node_group_type]}}"
+
+- 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 }}"