summaryrefslogtreecommitdiffstats
path: root/roles/openshift_aws/tasks/scale_group.yml
diff options
context:
space:
mode:
Diffstat (limited to 'roles/openshift_aws/tasks/scale_group.yml')
-rw-r--r--roles/openshift_aws/tasks/scale_group.yml32
1 files changed, 14 insertions, 18 deletions
diff --git a/roles/openshift_aws/tasks/scale_group.yml b/roles/openshift_aws/tasks/scale_group.yml
index 3e969fc43..097859af2 100644
--- a/roles/openshift_aws/tasks/scale_group.yml
+++ b/roles/openshift_aws/tasks/scale_group.yml
@@ -1,11 +1,4 @@
---
-- name: query vpc
- ec2_vpc_net_facts:
- region: "{{ openshift_aws_region }}"
- filters:
- 'tag:Name': "{{ openshift_aws_vpc_name }}"
- register: vpcout
-
- name: fetch the subnet to use in scale group
ec2_vpc_subnet_facts:
region: "{{ openshift_aws_region }}"
@@ -16,17 +9,20 @@
- name: Create the scale group
ec2_asg:
- name: "{{ openshift_aws_scale_group_name }}"
- launch_config_name: "{{ openshift_aws_launch_config_name }}"
- health_check_period: "{{ openshift_aws_node_group_config[openshift_aws_node_group_type].health_check.period }}"
- health_check_type: "{{ openshift_aws_node_group_config[openshift_aws_node_group_type].health_check.type }}"
- min_size: "{{ openshift_aws_node_group_config[openshift_aws_node_group_type].min_size }}"
- max_size: "{{ openshift_aws_node_group_config[openshift_aws_node_group_type].max_size }}"
- desired_capacity: "{{ openshift_aws_node_group_config[openshift_aws_node_group_type].desired_size }}"
+ name: "{{ openshift_aws_scale_group_basename }} {{ item.key }}"
+ launch_config_name: "{{ openshift_aws_launch_config_basename }}-{{ item.key }}-{{ l_epoch_time }}"
+ health_check_period: "{{ item.value.health_check.period }}"
+ health_check_type: "{{ item.value.health_check.type }}"
+ min_size: "{{ item.value.min_size }}"
+ max_size: "{{ item.value.max_size }}"
+ desired_capacity: "{{ item.value.desired_size }}"
region: "{{ openshift_aws_region }}"
- termination_policies: "{{ openshift_aws_node_group_config[openshift_aws_node_group_type].termination_policy if 'termination_policy' in openshift_aws_node_group_config[openshift_aws_node_group_type] else omit }}"
- load_balancers: "{{ openshift_aws_node_group_config[openshift_aws_node_group_type].elbs if 'elbs' in openshift_aws_node_group_config[openshift_aws_node_group_type] else omit }}"
- wait_for_instances: "{{ openshift_aws_node_group_config[openshift_aws_node_group_type].wait_for_instances | default(False)}}"
+ termination_policies: "{{ item.value.termination_policy if 'termination_policy' in item.value else omit }}"
+ load_balancers: "{{ item.value.elbs if 'elbs' in item.value else omit }}"
+ wait_for_instances: "{{ item.value.wait_for_instances | default(False)}}"
vpc_zone_identifier: "{{ subnetout.subnets[0].id }}"
+ replace_instances: "{{ openshift_aws_node_group_replace_instances if openshift_aws_node_group_replace_instances != [] else omit }}"
+ replace_all_instances: "{{ omit if openshift_aws_node_group_replace_instances != [] else (item.value.replace_all_instances | default(omit)) }}"
tags:
- - "{{ openshift_aws_node_group_config.tags | combine(openshift_aws_node_group_config[openshift_aws_node_group_type].tags) }}"
+ - "{{ openshift_aws_node_group_config_tags | combine(item.value.tags) }}"
+ with_dict: "{{ l_nodes_to_build }}"