diff options
author | Larry Smith Jr <mrlesmithjr@gmail.com> | 2016-12-21 22:05:46 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-12-21 22:05:46 -0500 |
commit | 16dd29dd68381a3771b0c0cf84d05d1dfed05367 (patch) | |
tree | f681429747f8afabb654945f12d4224dea623bad | |
parent | 109c6b750751d1c5cd216ad2f09258cf512c4c9e (diff) | |
parent | 88f5d4ebb0ed7ea9ef341888cb53016fe2775383 (diff) | |
download | ansible-rabbitmq-16dd29dd68381a3771b0c0cf84d05d1dfed05367.tar.gz ansible-rabbitmq-16dd29dd68381a3771b0c0cf84d05d1dfed05367.tar.zst ansible-rabbitmq-16dd29dd68381a3771b0c0cf84d05d1dfed05367.zip |
Merge pull request #7 from erick0z/master
Fix cluster reset
-rw-r--r-- | tasks/rabbitmq_clustering.yml | 4 |
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 | ||