瀏覽代碼

Conditionally set --nodes on master

- only add --nodes option to /etc/sysconfig/openshift-master when
  openshift_node_ips is not an empty list.
Jason DeTiberus 10 年之前
父節點
當前提交
b32741c648
共有 1 個文件被更改,包括 3 次插入2 次删除
  1. 3 2
      roles/openshift_master/tasks/main.yml

+ 3 - 2
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