summaryrefslogtreecommitdiffstats
path: root/playbooks/common/openshift-cluster/evaluate_groups.yml
diff options
context:
space:
mode:
Diffstat (limited to 'playbooks/common/openshift-cluster/evaluate_groups.yml')
-rw-r--r--playbooks/common/openshift-cluster/evaluate_groups.yml17
1 files changed, 14 insertions, 3 deletions
diff --git a/playbooks/common/openshift-cluster/evaluate_groups.yml b/playbooks/common/openshift-cluster/evaluate_groups.yml
index 7917bfba5..cab81b889 100644
--- a/playbooks/common/openshift-cluster/evaluate_groups.yml
+++ b/playbooks/common/openshift-cluster/evaluate_groups.yml
@@ -10,8 +10,8 @@
when: g_etcd_hosts is not defined
- fail:
- msg: This playbook requires g_master_hosts to be set
- when: g_master_hosts is not defined
+ msg: This playbook requires g_master_hosts or g_new_master_hosts to be set
+ when: g_master_hosts is not defined and g_new_master_hosts is not defined
- fail:
msg: This playbook requires g_node_hosts or g_new_node_hosts to be set
@@ -29,6 +29,14 @@
msg: The nfs group must be limited to one host
when: (groups[g_nfs_hosts] | default([])) | length > 1
+ - name: Evaluate oo_masters
+ add_host:
+ name: "{{ item }}"
+ groups: oo_masters
+ ansible_ssh_user: "{{ g_ssh_user | default(omit) }}"
+ ansible_sudo: "{{ g_sudo | default(omit) }}"
+ with_items: "{{ g_all_master_hosts | default([]) }}"
+
- name: Evaluate oo_etcd_to_config
add_host:
name: "{{ item }}"
@@ -37,13 +45,16 @@
ansible_sudo: "{{ g_sudo | default(omit) }}"
with_items: "{{ g_etcd_hosts | default([]) }}"
+ - set_fact:
+ g_master_hosts_to_config: "{{ g_new_master_hosts | default(g_master_hosts | default([], true), true) }}"
+
- name: Evaluate oo_masters_to_config
add_host:
name: "{{ item }}"
groups: oo_masters_to_config
ansible_ssh_user: "{{ g_ssh_user | default(omit) }}"
ansible_sudo: "{{ g_sudo | default(omit) }}"
- with_items: "{{ g_master_hosts | default([]) }}"
+ with_items: "{{ g_master_hosts_to_config | default([]) }}"
# Use g_new_node_hosts if it exists otherwise g_node_hosts
- set_fact: