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