aboutsummaryrefslogtreecommitdiffhomepage
path: root/tasks/rabbitmq_ha_config.yml
diff options
context:
space:
mode:
authorLarry Smith Jr <mrlesmithjr@gmail.com>2016-12-03 17:50:41 -0500
committerLarry Smith Jr <mrlesmithjr@gmail.com>2016-12-03 17:50:41 -0500
commit8f8673fb8dfa2bd4fa2694cbfdcb6eed54e502de (patch)
treeaaaf71ac94a4bd065cefd8b3c75603efe3703d89 /tasks/rabbitmq_ha_config.yml
parentda8e343df912e94703a8094f5e62d4c1bcc57345 (diff)
downloadansible-rabbitmq-8f8673fb8dfa2bd4fa2694cbfdcb6eed54e502de.tar.gz
ansible-rabbitmq-8f8673fb8dfa2bd4fa2694cbfdcb6eed54e502de.tar.zst
ansible-rabbitmq-8f8673fb8dfa2bd4fa2694cbfdcb6eed54e502de.zip
Updated gitignore
Signed-off-by: Larry Smith Jr <mrlesmithjr@gmail.com>
Diffstat (limited to 'tasks/rabbitmq_ha_config.yml')
-rw-r--r--tasks/rabbitmq_ha_config.yml44
1 files changed, 0 insertions, 44 deletions
diff --git a/tasks/rabbitmq_ha_config.yml b/tasks/rabbitmq_ha_config.yml
deleted file mode 100644
index 8811b6d..0000000
--- a/tasks/rabbitmq_ha_config.yml
+++ /dev/null
@@ -1,44 +0,0 @@
1---
2- name: rabbitmq_ha_config | checking if rabbitmqadmin is installed
3 stat:
4 path: /usr/sbin/rabbitmqadmin
5 register: rabbitmqadmin_check
6
7- name: rabbitmq_ha_config | install rabbitMQ admin
8 shell: wget http://guest:guest@localhost:15672/cli/rabbitmqadmin
9 when: not rabbitmqadmin_check.stat.exists
10
11- name: rabbitmq_ha_config | moving the rabbitMQ Admin
12 shell: mv rabbitmqadmin /usr/sbin
13 when: not rabbitmqadmin_check.stat.exists
14
15- name: rabbitmq_ha_config | making executable rabbitMQ Admin
16 shell: chmod +x /usr/sbin/rabbitmqadmin
17 notify: restart rabbitmq-server
18 when: not rabbitmqadmin_check.stat.exists
19
20- name: rabbitmq_ha_config | creating queue(s)
21 command: rabbitmqadmin declare queue name={{ item.queue_name }} durable={{ item.durable|lower }}
22 run_once: true
23 with_items: "{{ rabbitmq_config }}"
24
25- name: rabbitmq_ha_config | setting up ha on queue(s)
26 rabbitmq_policy:
27 name: "ha-all"
28 pattern: "{{ item.queue_name }}"
29 tags: "{{ item.tags }}"
30 state: present
31 run_once: true
32 with_items: "{{ rabbitmq_config }}"
33
34- name: rabbitmq_ha_config | creating exchange(s)
35 command: rabbitmqadmin declare exchange name={{ item.exchange_name }} type={{ item.type }}
36 run_once: true
37 with_items: "{{ rabbitmq_config }}"
38 when: item.exchange_name is defined
39
40- name: rabbitmq_ha_config | creating binding(s)
41 command: rabbitmqadmin declare binding source={{ item.exchange_name }} destination_type="queue" destination={{ item.queue_name }} routing_key={{ item.routing_key }}
42 run_once: true
43 with_items: "{{ rabbitmq_config }}"
44 when: item.exchange_name is defined