From cc7b1a3f585a86c21eb88d850d963148b98c9f23 Mon Sep 17 00:00:00 2001 From: Andrew Butcher Date: Mon, 18 Jan 2016 10:29:48 -0500 Subject: Fix cluster_method conditional in master restart playbook. --- playbooks/common/openshift-master/restart.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'playbooks') diff --git a/playbooks/common/openshift-master/restart.yml b/playbooks/common/openshift-master/restart.yml index 987fae63c..5c8e34817 100644 --- a/playbooks/common/openshift-master/restart.yml +++ b/playbooks/common/openshift-master/restart.yml @@ -73,12 +73,12 @@ command: > systemctl is-active {{ openshift.common.service_type }}-master 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'] changed_when: false - set_fact: 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 hosts: localhost -- cgit v1.2.3 From 5273611da653bca4a15cfe57e4acc57aef089a37 Mon Sep 17 00:00:00 2001 From: Andrew Butcher Date: Mon, 18 Jan 2016 10:44:37 -0500 Subject: Add 'unknown' to possible output for the is-active check. --- playbooks/common/openshift-master/restart.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'playbooks') diff --git a/playbooks/common/openshift-master/restart.yml b/playbooks/common/openshift-master/restart.yml index 5c8e34817..d9d857b1a 100644 --- a/playbooks/common/openshift-master/restart.yml +++ b/playbooks/common/openshift-master/restart.yml @@ -74,7 +74,7 @@ systemctl is-active {{ openshift.common.service_type }}-master register: active_check_output 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', 'unknown'] changed_when: false - set_fact: is_active: "{{ active_check_output.stdout == 'active' }}" -- cgit v1.2.3