From 3a55d2ab8ab3a399faaf25c4f46e7f2ea142edc6 Mon Sep 17 00:00:00 2001 From: Larry Smith Jr Date: Fri, 7 Apr 2017 23:30:56 -0400 Subject: Updated Vagrant testing Signed-off-by: Larry Smith Jr --- Vagrant/roles/ansible-rabbitmq/tasks/rabbitmq_clustering.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Vagrant/roles/ansible-rabbitmq/tasks/rabbitmq_clustering.yml') diff --git a/Vagrant/roles/ansible-rabbitmq/tasks/rabbitmq_clustering.yml b/Vagrant/roles/ansible-rabbitmq/tasks/rabbitmq_clustering.yml index 9dece46..5134c50 100644 --- a/Vagrant/roles/ansible-rabbitmq/tasks/rabbitmq_clustering.yml +++ b/Vagrant/roles/ansible-rabbitmq/tasks/rabbitmq_clustering.yml @@ -1,9 +1,11 @@ --- - name: rabbitmq_clustering | stopping rabbitmq app command: rabbitmqctl stop_app + when: inventory_hostname != "{{ rabbitmq_master }}" - name: rabbitmq_clustering | resetting rabbitmq app command: rabbitmqctl reset + when: inventory_hostname != "{{ rabbitmq_master }}" - name: rabbitmq_clustering | stopping rabbitmq-server service: @@ -55,7 +57,7 @@ when: inventory_hostname != "{{ rabbitmq_master }}" - name: rabbitmq_clustering | joining rabbitmq cluster - command: rabbitmqctl join_cluster 'rabbit@{{ rabbitmq_master }}' + command: rabbitmqctl join_cluster "rabbit@{{ hostvars[rabbitmq_master]['ansible_hostname'] }}" register: cluster_joined when: inventory_hostname != "{{ rabbitmq_master }}" -- cgit v1.2.3