From 10344646f028931e51befd890a19d24622f6486c Mon Sep 17 00:00:00 2001 From: Larry Smith Jr Date: Sun, 9 Aug 2015 09:52:29 -0400 Subject: updated setting erlang cookie method --- defaults/main.yml | 2 +- tasks/rabbitmq_clustering.yml | 10 +++++----- templates/erlang.cookie.j2 | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/defaults/main.yml b/defaults/main.yml index 16191ff..e0f06a5 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -2,7 +2,7 @@ # defaults file for ansible-rabbitmq config_rabbitmq_ha: false #defines if rabbitmq ha should be configured...define here or in group_vars/group enable_rabbitmq_clustering: false #defines if setting up a rabbitmq cluster...define here or in group_vars/group -#erlang_cookie: #define erlang cookie for cluster...define here or in group_vars/group +erlang_cookie: LSKNKBELKPSTDBBCHETL #define erlang cookie for cluster...define here or in group_vars/group erlang_cookie_file: /var/lib/rabbitmq/.erlang.cookie rabbitmq_config: - queue_name: logstash diff --git a/tasks/rabbitmq_clustering.yml b/tasks/rabbitmq_clustering.yml index 4d8dd0d..348662a 100644 --- a/tasks/rabbitmq_clustering.yml +++ b/tasks/rabbitmq_clustering.yml @@ -8,14 +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: 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={{ erlang_cookie_file }} owner=rabbitmq group=rabbitmq mode=0400 backup=yes - when: inventory_hostname != "{{ rabbitmq_master }}" +# when: inventory_hostname != "{{ rabbitmq_master }}" - name: rabbitmq_clustering | restarting rabbitmq-server on master service: name=rabbitmq-server state=restarted diff --git a/templates/erlang.cookie.j2 b/templates/erlang.cookie.j2 index 82b6c9a..cb398e7 100644 --- a/templates/erlang.cookie.j2 +++ b/templates/erlang.cookie.j2 @@ -1 +1 @@ -{{ hostvars.rabbitmq_master.erlang_cookie.stdout }} +{{ erlang_cookie }} -- cgit v1.2.3