aboutsummaryrefslogblamecommitdiffhomepage
path: root/Vagrant/roles/ansible-rabbitmq/tasks/rabbitmq_users.yml
blob: 8bce8b27a0c1134bff1ccb2faaa3fb47e8f5de0d (plain) (tree)


























                                                                                                                               
---
- 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)