diff options
author | Gaëtan Duchaussois <gaetan.duchaussois@fretlink.com> | 2018-12-18 16:13:25 +0100 |
---|---|---|
committer | Gaëtan Duchaussois <gaetan.duchaussois@fretlink.com> | 2018-12-18 16:13:25 +0100 |
commit | ebb0d317ed8053a12e2fa5930e433ce9f3e18670 (patch) | |
tree | 837fa310261db77bd8797f84a0f96c88ec2b50e4 /tasks/rabbitmq_ha_config.yml | |
parent | 991fe83812bb2814096e8ec3e8f6dc86fee5f3ef (diff) | |
download | ansible-rabbitmq-ebb0d317ed8053a12e2fa5930e433ce9f3e18670.tar.gz ansible-rabbitmq-ebb0d317ed8053a12e2fa5930e433ce9f3e18670.tar.zst ansible-rabbitmq-ebb0d317ed8053a12e2fa5930e433ce9f3e18670.zip |
add vhost for exchange and queue declaration
Diffstat (limited to 'tasks/rabbitmq_ha_config.yml')
-rw-r--r-- | tasks/rabbitmq_ha_config.yml | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tasks/rabbitmq_ha_config.yml b/tasks/rabbitmq_ha_config.yml index bf74957..ffda6e9 100644 --- a/tasks/rabbitmq_ha_config.yml +++ b/tasks/rabbitmq_ha_config.yml | |||
@@ -21,7 +21,7 @@ | |||
21 | when: not rabbitmqadmin_check['stat']['exists'] | 21 | when: not rabbitmqadmin_check['stat']['exists'] |
22 | 22 | ||
23 | - name: rabbitmq_ha_config | creating queue(s) | 23 | - name: rabbitmq_ha_config | creating queue(s) |
24 | command: rabbitmqadmin declare queue name={{ item['queue_name'] }} durable={{ item['durable']|lower }} | 24 | command: rabbitmqadmin declare queue name={{ item['queue_name'] }} durable={{ item['durable']|lower }} --vhost={{ item['vhost'] | default('/') }} |
25 | run_once: true | 25 | run_once: true |
26 | become: true | 26 | become: true |
27 | with_items: "{{ rabbitmq_config }}" | 27 | with_items: "{{ rabbitmq_config }}" |
@@ -37,14 +37,14 @@ | |||
37 | with_items: "{{ rabbitmq_config }}" | 37 | with_items: "{{ rabbitmq_config }}" |
38 | 38 | ||
39 | - name: rabbitmq_ha_config | creating exchange(s) | 39 | - name: rabbitmq_ha_config | creating exchange(s) |
40 | command: rabbitmqadmin declare exchange name={{ item['exchange_name'] }} type={{ item['type'] }} | 40 | command: rabbitmqadmin declare exchange name={{ item['exchange_name'] }} type={{ item['type'] }} --vhost={{ item['vhost'] | default('/') }} |
41 | run_once: true | 41 | run_once: true |
42 | become: true | 42 | become: true |
43 | with_items: "{{ rabbitmq_config }}" | 43 | with_items: "{{ rabbitmq_config }}" |
44 | when: item['exchange_name'] is defined | 44 | when: item['exchange_name'] is defined |
45 | 45 | ||
46 | - name: rabbitmq_ha_config | creating binding(s) | 46 | - name: rabbitmq_ha_config | creating binding(s) |
47 | command: rabbitmqadmin declare binding source={{ item['exchange_name'] }} destination_type="queue" destination={{ item['queue_name'] }} routing_key={{ item['routing_key'] }} | 47 | command: rabbitmqadmin declare binding source={{ item['exchange_name'] }} destination_type="queue" destination={{ item['queue_name'] }} routing_key={{ item['routing_key'] }} --vhost={{ item['vhost'] | default('/') }} |
48 | run_once: true | 48 | run_once: true |
49 | become: true | 49 | become: true |
50 | with_items: "{{ rabbitmq_config }}" | 50 | with_items: "{{ rabbitmq_config }}" |