]>
Commit | Line | Data |
---|---|---|
eb299d9b | 1 | --- |
a290f6cf | 2 | - name: rabbitmq_ha_config | install rabbitMQ admin |
eb299d9b LSJ |
3 | shell: wget http://guest:guest@localhost:55672/cli/rabbitmqadmin |
4 | ||
a290f6cf | 5 | - name: rabbitmq_ha_config | moving the rabbitMQ Admin |
eb299d9b LSJ |
6 | shell: mv rabbitmqadmin /usr/sbin |
7 | ||
a290f6cf | 8 | - name: rabbitmq_ha_config | making executable rabbitMQ Admin |
eb299d9b LSJ |
9 | shell: chmod +x /usr/sbin/rabbitmqadmin |
10 | notify: restart rabbitmq-server | |
11 | ||
a290f6cf | 12 | - name: rabbitmq_ha_config | creating queue(s) |
d5d7b014 | 13 | command: rabbitmqadmin declare queue name={{ item.queue_name }} durable={{ item.durable|lower }} |
eb299d9b LSJ |
14 | run_once: true |
15 | with_items: rabbitmq_config | |
16 | ||
a290f6cf | 17 | - name: rabbitmq_ha_config | setting up ha on queue(s) |
eb299d9b LSJ |
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 | ||
a290f6cf | 22 | - name: rabbitmq_ha_config | creating exchange(s) |
eb299d9b LSJ |
23 | command: rabbitmqadmin declare exchange name={{ item.exchange_name }} type={{ item.type }} |
24 | run_once: true | |
25 | with_items: rabbitmq_config | |
26 | ||
a290f6cf | 27 | - name: rabbitmq_ha_config | creating binding(s) |
eb299d9b LSJ |
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 |