diff options
author | Larry Smith Jr <mrlesmithjr@gmail.com> | 2015-11-13 02:56:48 -0500 |
---|---|---|
committer | Larry Smith Jr <mrlesmithjr@gmail.com> | 2015-11-13 02:56:48 -0500 |
commit | 93a297c59940c7cfe88afe0f9110af5b4be521e3 (patch) | |
tree | 1d3f3904ecb83138f557f9a3ed40e72e032a3bfc /tasks/rabbitmq_clustering.yml | |
parent | 93f90e27f24275f9ccca908a2d77543dfa9bb379 (diff) | |
download | ansible-rabbitmq-93a297c59940c7cfe88afe0f9110af5b4be521e3.tar.gz ansible-rabbitmq-93a297c59940c7cfe88afe0f9110af5b4be521e3.tar.zst ansible-rabbitmq-93a297c59940c7cfe88afe0f9110af5b4be521e3.zip |
updated tasks, fixed broken HA configuration tasks
Diffstat (limited to 'tasks/rabbitmq_clustering.yml')
-rw-r--r-- | tasks/rabbitmq_clustering.yml | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/tasks/rabbitmq_clustering.yml b/tasks/rabbitmq_clustering.yml index 348662a..f9b5157 100644 --- a/tasks/rabbitmq_clustering.yml +++ b/tasks/rabbitmq_clustering.yml | |||
@@ -6,7 +6,9 @@ | |||
6 | command: rabbitmqctl reset | 6 | command: rabbitmqctl reset |
7 | 7 | ||
8 | - name: rabbitmq_clustering | stopping rabbitmq-server | 8 | - name: rabbitmq_clustering | stopping rabbitmq-server |
9 | service: name=rabbitmq-server state=stopped | 9 | service: |
10 | name: rabbitmq-server | ||
11 | state: stopped | ||
10 | 12 | ||
11 | #- name: grabbing erlang cookie | 13 | #- name: grabbing erlang cookie |
12 | # shell: cat /var/lib/rabbitmq/.erlang.cookie | 14 | # shell: cat /var/lib/rabbitmq/.erlang.cookie |
@@ -14,11 +16,19 @@ | |||
14 | # when: inventory_hostname == "{{ rabbitmq_master }}" | 16 | # when: inventory_hostname == "{{ rabbitmq_master }}" |
15 | 17 | ||
16 | - name: rabbitmq_clustering | copy erlang cookie | 18 | - name: rabbitmq_clustering | copy erlang cookie |
17 | template: src=erlang.cookie.j2 dest={{ erlang_cookie_file }} owner=rabbitmq group=rabbitmq mode=0400 backup=yes | 19 | template: |
20 | src: erlang.cookie.j2 | ||
21 | dest: "{{ erlang_cookie_file }}" | ||
22 | owner: rabbitmq | ||
23 | group: rabbitmq | ||
24 | mode: 0400 | ||
25 | backup: yes #backing up in case the need to recover | ||
18 | # when: inventory_hostname != "{{ rabbitmq_master }}" | 26 | # when: inventory_hostname != "{{ rabbitmq_master }}" |
19 | 27 | ||
20 | - name: rabbitmq_clustering | restarting rabbitmq-server on master | 28 | - name: rabbitmq_clustering | restarting rabbitmq-server on master |
21 | service: name=rabbitmq-server state=restarted | 29 | service: |
30 | name: rabbitmq-server | ||
31 | state: restarted | ||
22 | when: inventory_hostname == "{{ rabbitmq_master }}" | 32 | when: inventory_hostname == "{{ rabbitmq_master }}" |
23 | 33 | ||
24 | - name: rabbitmq_clustering | starting rabbitmq app on master | 34 | - name: rabbitmq_clustering | starting rabbitmq app on master |
@@ -31,7 +41,9 @@ | |||
31 | when: inventory_hostname != "{{ rabbitmq_master }}" | 41 | when: inventory_hostname != "{{ rabbitmq_master }}" |
32 | 42 | ||
33 | - name: rabbitmq_clustering | restarting rabbitmq-server | 43 | - name: rabbitmq_clustering | restarting rabbitmq-server |
34 | service: name=rabbitmq-server state=restarted | 44 | service: |
45 | name: rabbitmq-server | ||
46 | state: restarted | ||
35 | when: inventory_hostname != "{{ rabbitmq_master }}" | 47 | when: inventory_hostname != "{{ rabbitmq_master }}" |
36 | 48 | ||
37 | - name: rabbitmq_clustering | stopping rabbitmq app | 49 | - name: rabbitmq_clustering | stopping rabbitmq app |
@@ -52,5 +64,7 @@ | |||
52 | when: inventory_hostname != "{{ rabbitmq_master }}" | 64 | when: inventory_hostname != "{{ rabbitmq_master }}" |
53 | 65 | ||
54 | - name: rabbitmq_clustering | marking as clustered | 66 | - name: rabbitmq_clustering | marking as clustered |
55 | file: path=/etc/rabbitmq/clustered state=touch | 67 | file: |
68 | path: /etc/rabbitmq/clustered | ||
69 | state: touch | ||
56 | when: cluster_master.changed or cluster_joined.changed | 70 | when: cluster_master.changed or cluster_joined.changed |