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