Commit 0c6eac09 by Carson Gee

Added mirrored queues for clusters and VHOST support

parent 2a542cdf
......@@ -13,6 +13,9 @@ RABBIT_USERS:
RABBITMQ_CLUSTERED: !!null
RABBITMQ_VHOSTS:
- '/'
# Internal role variables below this line
# option to force deletion of the mnesia dir
......
......@@ -72,14 +72,25 @@
- name: rabbitmq | remove guest user
rabbitmq_user: user="guest" state=absent
- name: rabbitmq | add vhosts
rabbitmq_vhost: name={{ item }} state=present
with_items: RABBITMQ_VHOSTS
- name: rabbitmq | add admin users
rabbitmq_user: >
user='{{item.name}}' password='{{item.password}}'
user='{{item[0].name}}' password='{{item[0].password}}'
read_priv='.*' write_priv='.*'
configure_priv='.*' tags="administrator" state=present
with_items: rabbitmq_auth_config.admins
vhost={{ item[1] }}
with_nested:
- ${rabbitmq_auth_config.admins}
- RABBITMQ_VHOSTS
when: "'admins' in rabbitmq_auth_config"
- name: rabbitmq | make queues mirrored
shell: "/usr/sbin/rabbitmqctl set_policy HA '^(?!amq\\.).*' '{\"ha-mode\": \"all\"}'"
when: RABBITMQ_CLUSTERED or rabbitmq_clustered_hosts|length > 1
#
# Depends upon the management plugin
#
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment