add vhost for exchange and queue declaration
when: not rabbitmqadmin_check['stat']['exists']
- name: rabbitmq_ha_config | creating queue(s)
- command: rabbitmqadmin declare queue name={{ item['queue_name'] }} durable={{ item['durable']|lower }}
+ command: rabbitmqadmin declare queue name={{ item['queue_name'] }} durable={{ item['durable']|lower }} --vhost={{ item['vhost'] | default('/') }}
run_once: true
become: true
+ when:
+ - item['queue_name'] is defined
with_items: "{{ rabbitmq_config }}"
- name: rabbitmq_ha_config | setting up ha on queue(s)