소스 검색

update handling of use_dnsmasq

Jason DeTiberus 8 년 전
부모
커밋
9a64840fc1
2개의 변경된 파일4개의 추가작업 그리고 4개의 파일을 삭제
  1. 2 2
      playbooks/common/openshift-node/config.yml
  2. 2 2
      roles/openshift_facts/library/openshift_facts.py

+ 2 - 2
playbooks/common/openshift-node/config.yml

@@ -67,7 +67,7 @@
     openshift_ca_host: "{{ groups.oo_first_master.0 }}"
   - role: openshift_cloud_provider
   - role: openshift_node_dnsmasq
-    when: openshift.common.use_dnsmasq
+    when: openshift.common.use_dnsmasq | bool
   - role: os_firewall
     os_firewall_allow:
     - service: Kubernetes kubelet
@@ -106,7 +106,7 @@
     openshift_ca_host: "{{ groups.oo_first_master.0 }}"
   - role: openshift_cloud_provider
   - role: openshift_node_dnsmasq
-    when: openshift.common.use_dnsmasq
+    when: openshift.common.use_dnsmasq | bool
   - role: os_firewall
     os_firewall_allow:
     - service: Kubernetes kubelet

+ 2 - 2
roles/openshift_facts/library/openshift_facts.py

@@ -501,8 +501,8 @@ def set_dnsmasq_facts_if_unset(facts):
     """
 
     if 'common' in facts:
-        facts['common']['use_dnsmasq'] = bool('use_dnsmasq' not in facts['common'] and
-                                              safe_get_bool(facts['common']['version_gte_3_2_or_1_2']))
+        if 'use_dnsmasq' not in facts['common']:
+            facts['common']['use_dnsmasq'] = bool(safe_get_bool(facts['common']['version_gte_3_2_or_1_2']))
         if 'master' in facts and 'dns_port' not in facts['master']:
             if safe_get_bool(facts['common']['use_dnsmasq']):
                 facts['master']['dns_port'] = 8053