summaryrefslogtreecommitdiffstats
path: root/roles/openshift_aws/tasks/security_group.yml
diff options
context:
space:
mode:
Diffstat (limited to 'roles/openshift_aws/tasks/security_group.yml')
-rw-r--r--roles/openshift_aws/tasks/security_group.yml30
1 files changed, 9 insertions, 21 deletions
diff --git a/roles/openshift_aws/tasks/security_group.yml b/roles/openshift_aws/tasks/security_group.yml
index e1fb99b02..0568a0190 100644
--- a/roles/openshift_aws/tasks/security_group.yml
+++ b/roles/openshift_aws/tasks/security_group.yml
@@ -6,35 +6,23 @@
"tag:Name": "{{ openshift_aws_clusterid }}"
register: vpcout
-- 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 [] }}"
+ oo_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 }}"
- register: sg_create
- with_items:
- - "{{ openshift_aws_node_security_groups[openshift_aws_node_group_type]}}"
+ with_dict: "{{ openshift_aws_node_security_groups }}"
- name: create the k8s sgs for the node group
- ec2_group:
- name: "{{ item.name }}_k8s"
- description: "{{ item.desc }} for k8s"
+ oo_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: "{{ openshift_aws_node_security_groups }}"
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: