blob: afd4c779f3c8e5549e90f6bf8bbe1f47cffbe106 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
---
- name: stop rabbitmq app
command: rabbitmqctl stop_app
when: HA_CLUSTER[inventory_hostname] != ''
- name: rabbitmqctl reset
command: rabbitmqctl reset
when: HA_CLUSTER[inventory_hostname] != ''
- name: stop rabbitmq
shell: rabbitmqctl stop
- name: set detach
shell: rabbitmq-server -detached
- name: join cluster
command: rabbitmqctl join_cluster rabbit@{{ item }}
when: item != inventory_hostname and HA_CLUSTER[item] == ''
with_items:
groups['controller']
- name: start rabbitmq app
command: rabbitmqctl start_app
- name: set the HA policy
rabbitmq_policy: name=ha-all pattern='^(?!amq\.).*' tags="ha-mode=all"
|