From 84d38251e016aebeb6fc72a5c76a486f0542212b Mon Sep 17 00:00:00 2001 From: Paul Bonaud Date: Mon, 17 Dec 2018 19:02:27 +0100 Subject: vhosts: Adding rabbitmq vhosts creation --- tasks/main.yml | 3 +++ tasks/rabbitmq_vhosts.yml | 7 +++++++ 2 files changed, 10 insertions(+) create mode 100644 tasks/rabbitmq_vhosts.yml (limited to 'tasks') diff --git a/tasks/main.yml b/tasks/main.yml index 1ef08f0..a9dc4d2 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -26,6 +26,9 @@ rabbitmq_enable_clustering and not clustered['stat']['exists'] +- include: rabbitmq_vhosts.yml + when: rabbitmq_extra_vhosts is defined + - include: rabbitmq_ha_config.yml when: > rabbitmq_config_ha and diff --git a/tasks/rabbitmq_vhosts.yml b/tasks/rabbitmq_vhosts.yml new file mode 100644 index 0000000..790ac18 --- /dev/null +++ b/tasks/rabbitmq_vhosts.yml @@ -0,0 +1,7 @@ +--- +- name: Create vhosts + rabbitmq_vhost: + name: "{{ item['name'] }}" + state: "{{ item['state'] }}" + with_items: "{{ rabbitmq_extra_vhosts }}" + run_once: "{{ rabbitmq_enable_clustering is defined and rabbitmq_enable_clustering }}" -- cgit v1.2.3