summaryrefslogtreecommitdiffstats
path: root/roles/openshift_aws
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2017-10-03 20:37:18 -0700
committerGitHub <noreply@github.com>2017-10-03 20:37:18 -0700
commitaed6a82ddf45052bc9ef58380dc0be784294f249 (patch)
tree55d22be8c77925be3298cf6abc7b796f571c7faf /roles/openshift_aws
parent859d38301d90166ce4f348b76551409658991d9d (diff)
parent9a956ef26a21bc2e1380d5a579d3435181f6a0f6 (diff)
downloadopenshift-aed6a82ddf45052bc9ef58380dc0be784294f249.tar.gz
openshift-aed6a82ddf45052bc9ef58380dc0be784294f249.tar.bz2
openshift-aed6a82ddf45052bc9ef58380dc0be784294f249.tar.xz
openshift-aed6a82ddf45052bc9ef58380dc0be784294f249.zip
Merge pull request #5606 from mgugino-upstream-stage/provision-scale-elb-fixes-master
Automatic merge from submit-queue. Fix provisiong scale group and elb logic Some changes necessary to support provisioning and scale group logic Some of this work is duplicated from an existing PR. That PR is about to merge, so I'll rebase once that hits.
Diffstat (limited to 'roles/openshift_aws')
-rw-r--r--roles/openshift_aws/defaults/main.yml5
-rw-r--r--roles/openshift_aws/tasks/launch_config.yml15
2 files changed, 15 insertions, 5 deletions
diff --git a/roles/openshift_aws/defaults/main.yml b/roles/openshift_aws/defaults/main.yml
index ca39c1aec..94c0f4472 100644
--- a/roles/openshift_aws/defaults/main.yml
+++ b/roles/openshift_aws/defaults/main.yml
@@ -143,6 +143,11 @@ openshift_aws_elb_instance_filter:
"tag:host-type": "{{ openshift_aws_node_group_type }}"
instance-state-name: running
+openshift_aws_launch_config_security_groups:
+- "{{ openshift_aws_clusterid }}" # default sg
+- "{{ openshift_aws_clusterid }}_{{ openshift_aws_node_group_type }}" # node type sg
+- "{{ openshift_aws_clusterid }}_{{ openshift_aws_node_group_type }}_k8s" # node type sg k8s
+
openshift_aws_node_security_groups:
default:
name: "{{ openshift_aws_clusterid }}"
diff --git a/roles/openshift_aws/tasks/launch_config.yml b/roles/openshift_aws/tasks/launch_config.yml
index 65c5a6cc0..e6be9969c 100644
--- a/roles/openshift_aws/tasks/launch_config.yml
+++ b/roles/openshift_aws/tasks/launch_config.yml
@@ -4,13 +4,18 @@
when:
- openshift_aws_ami is undefined
+- name: query vpc
+ ec2_vpc_net_facts:
+ region: "{{ openshift_aws_region }}"
+ filters:
+ 'tag:Name': "{{ openshift_aws_vpc_name }}"
+ register: vpcout
+
- name: fetch the security groups for launch config
ec2_group_facts:
filters:
- group-name:
- - "{{ openshift_aws_clusterid }}" # default sg
- - "{{ openshift_aws_clusterid }}_{{ openshift_aws_node_group_type }}" # node type sg
- - "{{ openshift_aws_clusterid }}_{{ openshift_aws_node_group_type }}_k8s" # node type sg k8s
+ group-name: "{{ openshift_aws_launch_config_security_groups }}"
+ vpc-id: "{{ vpcout.vpcs[0].id }}"
region: "{{ openshift_aws_region }}"
register: ec2sgs
@@ -21,7 +26,7 @@
region: "{{ openshift_aws_region }}"
image_id: "{{ openshift_aws_ami }}"
instance_type: "{{ openshift_aws_node_group_config[openshift_aws_node_group_type].instance_type }}"
- security_groups: "{{ ec2sgs.security_groups | map(attribute='group_id')| list }}"
+ security_groups: "{{ openshift_aws_launch_config_security_group_id | default(ec2sgs.security_groups | map(attribute='group_id')| list) }}"
user_data: |-
#cloud-config
{% if openshift_aws_node_group_type != 'master' %}