blob: 55547826e2471425b7e7f1b51e1c4384cc889d82 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
---
- name: rabbitmq_ha_config | install | install rabbitMQ admin
shell: wget http://guest:guest@localhost:55672/cli/rabbitmqadmin
- name: Move the rabbitMQ Admin
shell: mv rabbitmqadmin /usr/sbin
- name: Make executable rabbitMQ Admin
shell: chmod +x /usr/sbin/rabbitmqadmin
notify: restart rabbitmq-server
- name: rabbitmq_ha_config | config | creating queue(s)
command: rabbitmqadmin declare queue name={{ item.queue_name }} durable={{ item.durable }}
run_once: true
with_items: rabbitmq_config
- name: rabbitmq_ha_config | config | setting up ha on queue(s)
rabbitmq_policy: name='ha-all' pattern='{{ item.queue_name }}' tags="{{ item.tags }}" state=present
run_once: true
with_items: rabbitmq_config
- name: rabbitmq_ha_config | config | creating exchange(s)
command: rabbitmqadmin declare exchange name={{ item.exchange_name }} type={{ item.type }}
run_once: true
with_items: rabbitmq_config
- name: rabbitmq_ha_config | config | creating binding(s)
command: rabbitmqadmin declare binding source={{ item.exchange_name }} destination_type="queue" destination={{ item.queue_name }} routing_key={{ item.routing_key }}
run_once: true
with_items: rabbitmq_config
|