aboutsummaryrefslogtreecommitdiffstats
path: root/docker/services/pacemaker/rabbitmq.yaml
diff options
context:
space:
mode:
Diffstat (limited to 'docker/services/pacemaker/rabbitmq.yaml')
-rw-r--r--docker/services/pacemaker/rabbitmq.yaml18
1 files changed, 16 insertions, 2 deletions
diff --git a/docker/services/pacemaker/rabbitmq.yaml b/docker/services/pacemaker/rabbitmq.yaml
index ba1abaf9..7333689c 100644
--- a/docker/services/pacemaker/rabbitmq.yaml
+++ b/docker/services/pacemaker/rabbitmq.yaml
@@ -215,20 +215,34 @@ outputs:
- name: set is_bootstrap_node fact
tags: common
set_fact: is_bootstrap_node={{bootstrap_node.stdout|lower == ansible_hostname|lower}}
+ - name: Check cluster resource status
+ tags: step2
+ pacemaker_resource:
+ resource: {get_attr: [RabbitmqBase, role_data, service_name]}
+ state: started
+ check_mode: true
+ ignore_errors: true
+ register: rabbitmq_res
- name: Disable the rabbitmq cluster resource.
tags: step2
pacemaker_resource:
resource: {get_attr: [RabbitmqBase, role_data, service_name]}
state: disable
wait_for_resource: true
- when: is_bootstrap_node
+ register: output
+ retries: 5
+ until: output.rc == 0
+ when: is_bootstrap_node and rabbitmq_res|succeeded
- name: Delete the stopped rabbitmq cluster resource.
tags: step2
pacemaker_resource:
resource: {get_attr: [RabbitmqBase, role_data, service_name]}
state: delete
wait_for_resource: true
- when: is_bootstrap_node
+ register: output
+ retries: 5
+ until: output.rc == 0
+ when: is_bootstrap_node and rabbitmq_res|succeeded
- name: Disable rabbitmq service
tags: step2
service: name=rabbitmq-server enabled=no