aboutsummaryrefslogtreecommitdiffhomepage
path: root/tasks
diff options
context:
space:
mode:
Diffstat (limited to 'tasks')
-rw-r--r--tasks/rabbitmq_clustering.yml4
1 files changed, 3 insertions, 1 deletions
diff --git a/tasks/rabbitmq_clustering.yml b/tasks/rabbitmq_clustering.yml
index 9dece46..5134c50 100644
--- a/tasks/rabbitmq_clustering.yml
+++ b/tasks/rabbitmq_clustering.yml
@@ -1,9 +1,11 @@
1--- 1---
2- name: rabbitmq_clustering | stopping rabbitmq app 2- name: rabbitmq_clustering | stopping rabbitmq app
3 command: rabbitmqctl stop_app 3 command: rabbitmqctl stop_app
4 when: inventory_hostname != "{{ rabbitmq_master }}"
4 5
5- name: rabbitmq_clustering | resetting rabbitmq app 6- name: rabbitmq_clustering | resetting rabbitmq app
6 command: rabbitmqctl reset 7 command: rabbitmqctl reset
8 when: inventory_hostname != "{{ rabbitmq_master }}"
7 9
8- name: rabbitmq_clustering | stopping rabbitmq-server 10- name: rabbitmq_clustering | stopping rabbitmq-server
9 service: 11 service:
@@ -55,7 +57,7 @@
55 when: inventory_hostname != "{{ rabbitmq_master }}" 57 when: inventory_hostname != "{{ rabbitmq_master }}"
56 58
57- name: rabbitmq_clustering | joining rabbitmq cluster 59- name: rabbitmq_clustering | joining rabbitmq cluster
58 command: rabbitmqctl join_cluster 'rabbit@{{ rabbitmq_master }}' 60 command: rabbitmqctl join_cluster "rabbit@{{ hostvars[rabbitmq_master]['ansible_hostname'] }}"
59 register: cluster_joined 61 register: cluster_joined
60 when: inventory_hostname != "{{ rabbitmq_master }}" 62 when: inventory_hostname != "{{ rabbitmq_master }}"
61 63