2 - name: stop rabbitmq app
3 command: rabbitmqctl stop_app
4 when: HA_CLUSTER[inventory_hostname] != ''
6 - name: rabbitmqctl reset
7 command: rabbitmqctl reset
8 when: HA_CLUSTER[inventory_hostname] != ''
11 shell: rabbitmqctl stop
14 shell: rabbitmq-server -detached
17 command: rabbitmqctl join_cluster rabbit@{{ item }}
18 when: item != inventory_hostname and HA_CLUSTER[item] == ''
22 - name: start rabbitmq app
23 command: rabbitmqctl start_app
25 - name: set the HA policy
26 rabbitmq_policy: name=ha-all pattern='^(?!amq\.).*' tags="ha-mode=all"