blob: 7bba65ec5a840ef4915551520737adc1f6b1d1a6 (
plain) (
tree)
|
|
---
- name: rabbitmq_users | creating rabbitmq users
rabbitmq_user:
name: "{{ item['name'] }}"
password: "{{ item['password'] }}"
vhost: "{{ item['vhost']|default(omit) }}"
configure_priv: "{{ item['configure_priv']|default(omit) }}"
read_priv: "{{ item['read_priv']|default(omit) }}"
write_priv: "{{ item['write_priv']|default(omit) }}"
tags: "{{ item['tags']|default(omit) }}"
permissions: "{{ item['permissions']|default(omit) }}"
state: present
become: true
with_items: "{{ rabbitmq_users }}"
when: >
(rabbitmq_enable_clustering is defined and
not rabbitmq_enable_clustering) or
rabbitmq_enable_clustering is not defined
- name: rabbitmq_users | creating rabbitmq users
rabbitmq_user:
name: "{{ item['name'] }}"
password: "{{ item['password'] }}"
vhost: "{{ item['vhost']|default(omit) }}"
configure_priv: "{{ item['configure_priv']|default(omit) }}"
read_priv: "{{ item['read_priv']|default(omit) }}"
write_priv: "{{ item['write_priv']|default(omit) }}"
tags: "{{ item['tags']|default(omit) }}"
permissions: "{{ item['permissions']|default(omit) }}"
state: present
run_once: yes
delegate_to: "{{ rabbitmq_master }}"
become: true
with_items: "{{ rabbitmq_users }}"
when: >
rabbitmq_enable_clustering is defined and
rabbitmq_enable_clustering
|