summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWesley Hearn <wesley.s.hearn@gmail.com>2015-08-26 11:00:50 -0400
committerWesley Hearn <wesley.s.hearn@gmail.com>2015-08-26 11:00:50 -0400
commit872c45cce659f5a6c22191a685e1e8190549fb1c (patch)
treeef8db3e541523652be8bb81eb18097bd516bc074
parentb118e65aac781d2abd841b28476cfbf5b94b537f (diff)
parent245bf785df17941e851e2ac7d3916e1159ddff23 (diff)
downloadopenshift-872c45cce659f5a6c22191a685e1e8190549fb1c.tar.gz
openshift-872c45cce659f5a6c22191a685e1e8190549fb1c.tar.bz2
openshift-872c45cce659f5a6c22191a685e1e8190549fb1c.tar.xz
openshift-872c45cce659f5a6c22191a685e1e8190549fb1c.zip
Merge pull request #511 from wshearn/label_aws_hosts
Set node labels for AWS hosts
-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