summaryrefslogtreecommitdiffstats
path: root/playbooks/libvirt
diff options
context:
space:
mode:
authorBrenton Leanhardt <bleanhar@redhat.com>2016-02-12 11:50:38 -0500
committerBrenton Leanhardt <bleanhar@redhat.com>2016-02-12 11:50:38 -0500
commit8bdead8a7178117068e8f91e6420e98619593273 (patch)
tree4a7cbb9185398bd35820de92a1443c0bd8d3387a /playbooks/libvirt
parentf9233a52cd65a1f15d9603ffaa0bebc15c386184 (diff)
parentbb24403ac9c9852a7be31791b70096d525696ade (diff)
downloadopenshift-8bdead8a7178117068e8f91e6420e98619593273.tar.gz
openshift-8bdead8a7178117068e8f91e6420e98619593273.tar.bz2
openshift-8bdead8a7178117068e8f91e6420e98619593273.tar.xz
openshift-8bdead8a7178117068e8f91e6420e98619593273.zip
Merge pull request #1391 from lhuard1A/labels
Add missing `type` node labels on OpenStack and libvirt
Diffstat (limited to 'playbooks/libvirt')
-rw-r--r--playbooks/libvirt/openshift-cluster/tasks/launch_instances.yml11
1 files changed, 11 insertions, 0 deletions
diff --git a/playbooks/libvirt/openshift-cluster/tasks/launch_instances.yml b/playbooks/libvirt/openshift-cluster/tasks/launch_instances.yml
index ebe9f0ad9..b00352539 100644
--- a/playbooks/libvirt/openshift-cluster/tasks/launch_instances.yml
+++ b/playbooks/libvirt/openshift-cluster/tasks/launch_instances.yml
@@ -94,6 +94,16 @@
- set_fact:
ips: "{{ scratch_ip.results | default([]) | oo_collect('stdout') }}"
+- set_fact:
+ node_label:
+ type: "{{ g_sub_host_type }}"
+ when: instances | length > 0 and type == "node"
+
+- set_fact:
+ node_label:
+ type: "{{ type }}"
+ when: instances | length > 0 and type != "node"
+
- name: Add new instances
add_host:
hostname: '{{ item.0 }}'
@@ -101,6 +111,7 @@
ansible_ssh_user: "{{ deployment_vars[deployment_type].ssh_user }}"
ansible_sudo: "{{ deployment_vars[deployment_type].sudo }}"
groups: "tag_environment-{{ cluster_env }}, tag_host-type-{{ type }}, tag_sub-host-type-{{ g_sub_host_type }}, tag_clusterid-{{ cluster_id }}"
+ openshift_node_labels: "{{ node_label }}"
with_together:
- instances
- ips