Commit cd021a00 by Nadeem Shahzad Committed by GitHub

Merge pull request #4002 from edx/nadeem/using-rabbitmq_user-with-permissions

using module rabbitmq_user with permissions
parents f74d6235 c9cb493e
......@@ -259,20 +259,25 @@
- "install"
- "install:app-configuration"
- set_fact:
permissions: "{{ permissions|default([])+[{'vhost':item,'configure_priv':'.*','read_priv':'.*','write_priv':'.*'}] }}"
with_items:
- "{{ RABBITMQ_VHOSTS }}"
tags:
- users
- maintenance
- "manage"
- "manage:app-users"
- name: Add admin users
rabbitmq_user:
user: "{{ item[0].name }}"
password: "{{ item[0].password }}"
force: yes
read_priv: '.*'
write_priv: '.*'
configure_priv: '.*'
user: "{{ item.name }}"
password: "{{ item.password }}"
tags: "administrator"
state: present
vhost: "{{ item[1] }}"
with_nested:
state: "{{ item.state | default('present') }}"
permissions: "{{ permissions }}"
with_items:
- "{{rabbitmq_auth_config.admins}}"
- "{{ RABBITMQ_VHOSTS }}"
when: "'admins' in rabbitmq_auth_config"
tags:
- users
......
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