From 19b4493522b98f36fcfcecad774ff7868e003783 Mon Sep 17 00:00:00 2001 From: Larry Smith Jr Date: Sun, 9 Aug 2015 09:21:36 -0400 Subject: updated setting erlang cookie method --- tasks/rabbitmq_clustering.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'tasks') diff --git a/tasks/rabbitmq_clustering.yml b/tasks/rabbitmq_clustering.yml index c595db0..4d8dd0d 100644 --- a/tasks/rabbitmq_clustering.yml +++ b/tasks/rabbitmq_clustering.yml @@ -8,8 +8,14 @@ - name: rabbitmq_clustering | stopping rabbitmq-server service: name=rabbitmq-server state=stopped +- name: grabbing erlang cookie + shell: cat /var/lib/rabbitmq/.erlang.cookie + register: erlang_cookie + when: inventory_hostname == "{{ rabbitmq_master }}" + - name: rabbitmq_clustering | copy erlang cookie - template: src=erlang.cookie.j2 dest=/var/lib/rabbitmq/.erlang.cookie owner=rabbitmq group=rabbitmq mode=0400 backup=yes + template: src=erlang.cookie.j2 dest={{ erlang_cookie_file }} owner=rabbitmq group=rabbitmq mode=0400 backup=yes + when: inventory_hostname != "{{ rabbitmq_master }}" - name: rabbitmq_clustering | restarting rabbitmq-server on master service: name=rabbitmq-server state=restarted -- cgit v1.2.3