aboutsummaryrefslogtreecommitdiffhomepage
path: root/tasks/rabbitmq_users.yml
diff options
context:
space:
mode:
authorLarry Smith Jr <mrlesmithjr@gmail.com>2017-05-20 21:23:32 -0400
committerGitHub <noreply@github.com>2017-05-20 21:23:32 -0400
commite21afd9063945e9825e4fe541244bc788a15590f (patch)
tree2971e931788eddf51b9ec71ac063bfb951215d0c /tasks/rabbitmq_users.yml
parent3a55d2ab8ab3a399faaf25c4f46e7f2ea142edc6 (diff)
parenta67dde50f26e0f76d91f0744e8e8341dac95dae2 (diff)
downloadansible-rabbitmq-e21afd9063945e9825e4fe541244bc788a15590f.tar.gz
ansible-rabbitmq-e21afd9063945e9825e4fe541244bc788a15590f.tar.zst
ansible-rabbitmq-e21afd9063945e9825e4fe541244bc788a15590f.zip
Merge pull request #12 from mrlesmithjr/enhancements/issues-9-10-11
Enhancements/issues 9 10 11
Diffstat (limited to 'tasks/rabbitmq_users.yml')
-rw-r--r--tasks/rabbitmq_users.yml39
1 files changed, 23 insertions, 16 deletions
diff --git a/tasks/rabbitmq_users.yml b/tasks/rabbitmq_users.yml
index 8bce8b2..98e45e2 100644
--- a/tasks/rabbitmq_users.yml
+++ b/tasks/rabbitmq_users.yml
@@ -1,27 +1,34 @@
1--- 1---
2- name: rabbitmq_users | creating rabbitmq users 2- name: rabbitmq_users | creating rabbitmq users
3 rabbitmq_user: 3 rabbitmq_user:
4 name: "{{ item.name }}" 4 name: "{{ item['name'] }}"
5 password: "{{ item.password }}" 5 password: "{{ item['password'] }}"
6 vhost: "{{ item.vhost }}" 6 vhost: "{{ item['vhost'] }}"
7 configure_priv: "{{ item.configure_priv }}" 7 configure_priv: "{{ item['configure_priv'] }}"
8 read_priv: "{{ item.read_priv }}" 8 read_priv: "{{ item['read_priv'] }}"
9 write_priv: "{{ item.write_priv }}" 9 write_priv: "{{ item['write_priv'] }}"
10 tags: "{{ item.tags }}" 10 tags: "{{ item['tags'] }}"
11 state: present 11 state: present
12 become: true
12 with_items: "{{ rabbitmq_users }}" 13 with_items: "{{ rabbitmq_users }}"
13 when: (rabbitmq_enable_clustering is defined and not rabbitmq_enable_clustering) or rabbitmq_enable_clustering is not defined 14 when: >
15 (rabbitmq_enable_clustering is defined and
16 not rabbitmq_enable_clustering) or
17 rabbitmq_enable_clustering is not defined
14 18
15- name: rabbitmq_users | creating rabbitmq users 19- name: rabbitmq_users | creating rabbitmq users
16 rabbitmq_user: 20 rabbitmq_user:
17 name: "{{ item.name }}" 21 name: "{{ item['name'] }}"
18 password: "{{ item.password }}" 22 password: "{{ item['password'] }}"
19 vhost: "{{ item.vhost }}" 23 vhost: "{{ item['vhost'] }}"
20 configure_priv: "{{ item.configure_priv }}" 24 configure_priv: "{{ item['configure_priv'] }}"
21 read_priv: "{{ item.read_priv }}" 25 read_priv: "{{ item['read_priv'] }}"
22 write_priv: "{{ item.write_priv }}" 26 write_priv: "{{ item['write_priv'] }}"
23 tags: "{{ item.tags }}" 27 tags: "{{ item['tags'] }}"
24 state: present 28 state: present
25 run_once: yes 29 run_once: yes
30 become: true
26 with_items: "{{ rabbitmq_users }}" 31 with_items: "{{ rabbitmq_users }}"
27 when: (rabbitmq_enable_clustering is defined and rabbitmq_enable_clustering) 32 when: >
33 rabbitmq_enable_clustering is defined and
34 rabbitmq_enable_clustering