summaryrefslogtreecommitdiffstats
path: root/playbooks/aws/openshift-cluster/tasks/launch_instances.yml
diff options
context:
space:
mode:
authorWesley Hearn <whearn@redhat.com>2015-08-25 17:22:39 -0400
committerWesley Hearn <whearn@redhat.com>2015-08-25 17:22:39 -0400
commit245bf785df17941e851e2ac7d3916e1159ddff23 (patch)
tree0d223744fb1d48479d1d2f39854c541f2b2cbac3 /playbooks/aws/openshift-cluster/tasks/launch_instances.yml
parent922b87ede66f6b7e376d1f46e13327077cd41719 (diff)
downloadopenshift-245bf785df17941e851e2ac7d3916e1159ddff23.tar.gz
openshift-245bf785df17941e851e2ac7d3916e1159ddff23.tar.bz2
openshift-245bf785df17941e851e2ac7d3916e1159ddff23.tar.xz
openshift-245bf785df17941e851e2ac7d3916e1159ddff23.zip
Set node labels for AWS hosts
Diffstat (limited to 'playbooks/aws/openshift-cluster/tasks/launch_instances.yml')
-rw-r--r--playbooks/aws/openshift-cluster/tasks/launch_instances.yml13
1 files changed, 13 insertions, 0 deletions
diff --git a/playbooks/aws/openshift-cluster/tasks/launch_instances.yml b/playbooks/aws/openshift-cluster/tasks/launch_instances.yml
index 236d84e74..e9ebc3e02 100644
--- a/playbooks/aws/openshift-cluster/tasks/launch_instances.yml
+++ b/playbooks/aws/openshift-cluster/tasks/launch_instances.yml
@@ -147,6 +147,18 @@
tag_host-type_{{ host_type }}, tag_env-host-type_{{ env_host_type }},
tag_sub-host-type_{{ sub_host_type }}"
+- set_fact:
+ node_label:
+ region: "{{ec2_region}}"
+ type: "{{sub_host_type}}"
+ when: host_type == "node"
+
+- set_fact:
+ node_label:
+ region: "{{ec2_region}}"
+ type: "{{host_type}}"
+ when: host_type != "node"
+
- name: Add new instances groups and variables
add_host:
hostname: "{{ item.0 }}"
@@ -156,6 +168,7 @@
groups: "{{ instance_groups }}"
ec2_private_ip_address: "{{ item.1.private_ip }}"
ec2_ip_address: "{{ item.1.public_ip }}"
+ openshift_node_labels: "{{ node_label }}"
with_together:
- instances
- ec2.instances