summaryrefslogtreecommitdiffstats
path: root/playbooks
diff options
context:
space:
mode:
authorLénaïc Huard <lhuard@amadeus.com>2016-08-19 14:33:18 +0200
committerLénaïc Huard <lhuard@amadeus.com>2016-08-19 14:53:03 +0200
commitbce3235761a16fd8048760ce8ee63e0a64d672a7 (patch)
tree07ac1c972980bb67f67c19aa6e809c86ed07c76e /playbooks
parenta96a9b713bb15146fa15f2535731c4ac83cc7bd5 (diff)
downloadopenshift-bce3235761a16fd8048760ce8ee63e0a64d672a7.tar.gz
openshift-bce3235761a16fd8048760ce8ee63e0a64d672a7.tar.bz2
openshift-bce3235761a16fd8048760ce8ee63e0a64d672a7.tar.xz
openshift-bce3235761a16fd8048760ce8ee63e0a64d672a7.zip
Fix the “node on master” feature
What we want to do is to add the master as a node if: * `g_nodeonmaster` is set to true, and * we are not in the case where we want to add new nodes. The second test was done by only checking whether `g_new_node_hosts` was defined. This was wrong because, in all cloud-provider setups, this variable was set with the default value of “empty list” (`[]`). The test has been changed to use the `bool` filter so that it correctly evaluates to false (and hence, effectively add the master as a node) when `g_new_node_hosts` is the empty list.
Diffstat (limited to 'playbooks')
-rw-r--r--playbooks/common/openshift-cluster/evaluate_groups.yml2
1 files changed, 1 insertions, 1 deletions
diff --git a/playbooks/common/openshift-cluster/evaluate_groups.yml b/playbooks/common/openshift-cluster/evaluate_groups.yml
index 3fb42a7fa..b3e02fb97 100644
--- a/playbooks/common/openshift-cluster/evaluate_groups.yml
+++ b/playbooks/common/openshift-cluster/evaluate_groups.yml
@@ -77,7 +77,7 @@
ansible_ssh_user: "{{ g_ssh_user | default(omit) }}"
ansible_become: "{{ g_sudo | default(omit) }}"
with_items: "{{ g_master_hosts | default([]) }}"
- when: g_nodeonmaster | default(false) == true and g_new_node_hosts is not defined
+ when: g_nodeonmaster | default(false) | bool and not g_new_node_hosts | default(false) | bool
- name: Evaluate oo_first_etcd
add_host: