diff options
author | Larry Smith Jr <mrlesmithjr@gmail.com> | 2018-12-20 00:53:16 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-20 00:53:16 -0500 |
commit | c760a03786a2247c14129dfd22c0e0fe1357f094 (patch) | |
tree | fcb0c5ce9a272a07ee4310abdcd9ccbf77837fd9 | |
parent | 2cf614d413be9c9f4948e034b6ec421a5964c00a (diff) | |
parent | ebb0d317ed8053a12e2fa5930e433ce9f3e18670 (diff) | |
download | ansible-rabbitmq-c760a03786a2247c14129dfd22c0e0fe1357f094.tar.gz ansible-rabbitmq-c760a03786a2247c14129dfd22c0e0fe1357f094.tar.zst ansible-rabbitmq-c760a03786a2247c14129dfd22c0e0fe1357f094.zip |
Merge pull request #19 from gaetanfl/fix_vhost
add vhost for exchange and queue declaration
-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 e62fc83..9ebe297 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 | when: | 27 | when: |
@@ -44,14 +44,14 @@ | |||
44 | with_items: "{{ rabbitmq_config }}" | 44 | with_items: "{{ rabbitmq_config }}" |
45 | 45 | ||
46 | - name: rabbitmq_ha_config | creating exchange(s) | 46 | - name: rabbitmq_ha_config | creating exchange(s) |
47 | command: rabbitmqadmin declare exchange name={{ item['exchange_name'] }} type={{ item['type'] }} | 47 | command: rabbitmqadmin declare exchange name={{ item['exchange_name'] }} type={{ item['type'] }} --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 }}" |
51 | when: item['exchange_name'] is defined | 51 | when: item['exchange_name'] is defined |
52 | 52 | ||
53 | - name: rabbitmq_ha_config | creating binding(s) | 53 | - name: rabbitmq_ha_config | creating binding(s) |
54 | command: rabbitmqadmin declare binding source={{ item['exchange_name'] }} destination_type="queue" destination={{ item['queue_name'] }} routing_key={{ item['routing_key'] }} | 54 | command: rabbitmqadmin declare binding source={{ item['exchange_name'] }} destination_type="queue" destination={{ item['queue_name'] }} routing_key={{ item['routing_key'] }} --vhost={{ item['vhost'] | default('/') }} |
55 | run_once: true | 55 | run_once: true |
56 | become: true | 56 | become: true |
57 | with_items: "{{ rabbitmq_config }}" | 57 | with_items: "{{ rabbitmq_config }}" |