From 109c6b750751d1c5cd216ad2f09258cf512c4c9e Mon Sep 17 00:00:00 2001 From: Larry Smith Jr Date: Sat, 3 Dec 2016 17:51:25 -0500 Subject: Addressed issue #6 Signed-off-by: Larry Smith Jr --- .../ansible-rabbitmq/tasks/rabbitmq_users.yml | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 Vagrant/roles/ansible-rabbitmq/tasks/rabbitmq_users.yml (limited to 'Vagrant/roles/ansible-rabbitmq/tasks/rabbitmq_users.yml') diff --git a/Vagrant/roles/ansible-rabbitmq/tasks/rabbitmq_users.yml b/Vagrant/roles/ansible-rabbitmq/tasks/rabbitmq_users.yml new file mode 100644 index 0000000..8bce8b2 --- /dev/null +++ b/Vagrant/roles/ansible-rabbitmq/tasks/rabbitmq_users.yml @@ -0,0 +1,27 @@ +--- +- name: rabbitmq_users | creating rabbitmq users + rabbitmq_user: + name: "{{ item.name }}" + password: "{{ item.password }}" + vhost: "{{ item.vhost }}" + configure_priv: "{{ item.configure_priv }}" + read_priv: "{{ item.read_priv }}" + write_priv: "{{ item.write_priv }}" + tags: "{{ item.tags }}" + state: present + 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 }}" + configure_priv: "{{ item.configure_priv }}" + read_priv: "{{ item.read_priv }}" + write_priv: "{{ item.write_priv }}" + tags: "{{ item.tags }}" + state: present + run_once: yes + with_items: "{{ rabbitmq_users }}" + when: (rabbitmq_enable_clustering is defined and rabbitmq_enable_clustering) -- cgit v1.2.3