From b32741c6480567f9118cbc14fe5a533b5f140e91 Mon Sep 17 00:00:00 2001 From: Jason DeTiberus Date: Mon, 9 Mar 2015 10:03:57 -0400 Subject: Conditionally set --nodes on master - only add --nodes option to /etc/sysconfig/openshift-master when openshift_node_ips is not an empty list. --- roles/openshift_master/tasks/main.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'roles') diff --git a/roles/openshift_master/tasks/main.yml b/roles/openshift_master/tasks/main.yml index a96184d70..15ba1e7e9 100644 --- a/roles/openshift_master/tasks/main.yml +++ b/roles/openshift_master/tasks/main.yml @@ -6,8 +6,9 @@ lineinfile: dest: /etc/sysconfig/openshift-master regexp: '^OPTIONS=' - line: "OPTIONS=\"--public-master={{ openshift_hostname }} --nodes={{ openshift_node_ips - | join(',') }} --loglevel={{ openshift_master_debug_level }}\"" + line: "OPTIONS=\"--public-master={{ openshift_hostname }} {% if + openshift_node_ips %} --nodes={{ openshift_node_ips + | join(',') }} {% endif %} --loglevel={{ openshift_master_debug_level }}\"" notify: - restart openshift-master -- cgit v1.2.3