diff options
author | Scott Dodson <sdodson@redhat.com> | 2017-12-12 09:15:52 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-12 09:15:52 -0500 |
commit | 01ae634a0bf89fe840006f9139f8ffd20e09afc8 (patch) | |
tree | d53a7c03e4855885e124559018fff32adeaaf4ea /roles/openshift_aws/tasks/security_group.yml | |
parent | 0b6fa3dcd40c2dd1f42fcceb52f82c2a28ed96e2 (diff) | |
parent | 35c1abb6050f2cd1f31396edd42618a2998bd546 (diff) | |
download | openshift-01ae634a0bf89fe840006f9139f8ffd20e09afc8.tar.gz openshift-01ae634a0bf89fe840006f9139f8ffd20e09afc8.tar.bz2 openshift-01ae634a0bf89fe840006f9139f8ffd20e09afc8.tar.xz openshift-01ae634a0bf89fe840006f9139f8ffd20e09afc8.zip |
Merge pull request #6335 from kwoodson/node_groups_refactor
Node group management update.
Diffstat (limited to 'roles/openshift_aws/tasks/security_group.yml')
-rw-r--r-- | roles/openshift_aws/tasks/security_group.yml | 30 |
1 files changed, 23 insertions, 7 deletions
diff --git a/roles/openshift_aws/tasks/security_group.yml b/roles/openshift_aws/tasks/security_group.yml index 43834079e..0568a0190 100644 --- a/roles/openshift_aws/tasks/security_group.yml +++ b/roles/openshift_aws/tasks/security_group.yml @@ -6,11 +6,27 @@ "tag:Name": "{{ openshift_aws_clusterid }}" register: vpcout -- include_tasks: security_group_create.yml - vars: - l_security_groups: "{{ openshift_aws_node_security_groups }}" +- name: create the node group sgs + 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 }}" + with_dict: "{{ openshift_aws_node_security_groups }}" + +- name: create the k8s sgs for the node group + 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 -- include_tasks: 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: 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 }}" |