summaryrefslogtreecommitdiffstats
path: root/playbooks/libvirt
diff options
context:
space:
mode:
Diffstat (limited to 'playbooks/libvirt')
-rw-r--r--playbooks/libvirt/openshift-cluster/tasks/launch_instances.yml11
-rw-r--r--playbooks/libvirt/openshift-cluster/templates/user-data1
-rw-r--r--playbooks/libvirt/openshift-cluster/terminate.yml2
3 files changed, 12 insertions, 2 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
diff --git a/playbooks/libvirt/openshift-cluster/templates/user-data b/playbooks/libvirt/openshift-cluster/templates/user-data
index e0c966e45..ead881f78 100644
--- a/playbooks/libvirt/openshift-cluster/templates/user-data
+++ b/playbooks/libvirt/openshift-cluster/templates/user-data
@@ -3,7 +3,6 @@ disable_root: true
hostname: {{ item[0] }}
fqdn: {{ item[0] }}.example.com
-manage_etc_hosts: true
users:
- default
diff --git a/playbooks/libvirt/openshift-cluster/terminate.yml b/playbooks/libvirt/openshift-cluster/terminate.yml
index 8d845c8f2..f4749c28d 100644
--- a/playbooks/libvirt/openshift-cluster/terminate.yml
+++ b/playbooks/libvirt/openshift-cluster/terminate.yml
@@ -23,7 +23,7 @@
- vars.yml
roles:
- role: rhel_unsubscribe
- when: deployment_type == "enterprise" and
+ when: deployment_type in ['atomic-enterprise', 'enterprise', 'openshift-enterprise'] and
ansible_distribution == "RedHat" and
lookup('oo_option', 'rhel_skip_subscription') | default(rhsub_skip, True) |
default('no', True) | lower in ['no', 'false']