Browse Source

Fix cluster_method conditional in master restart playbook.

Andrew Butcher 9 năm trước cách đây
mục cha
commit
cc7b1a3f58

+ 2 - 2
playbooks/common/openshift-master/restart.yml

@@ -73,12 +73,12 @@
     command: >
     command: >
       systemctl is-active {{ openshift.common.service_type }}-master
       systemctl is-active {{ openshift.common.service_type }}-master
     register: active_check_output
     register: active_check_output
-    when: openshift.master.cluster_method == 'pacemaker'
+    when: openshift.master.cluster_method | default(None) == 'pacemaker'
     failed_when: active_check_output.stdout not in ['active', 'inactive']
     failed_when: active_check_output.stdout not in ['active', 'inactive']
     changed_when: false
     changed_when: false
   - set_fact:
   - set_fact:
       is_active: "{{ active_check_output.stdout == 'active' }}"
       is_active: "{{ active_check_output.stdout == 'active' }}"
-    when: openshift.master.cluster_method == 'pacemaker'
+    when: openshift.master.cluster_method | default(None) == 'pacemaker'
 
 
 - name: Evaluate master groups
 - name: Evaluate master groups
   hosts: localhost
   hosts: localhost