diff --git a/tasks/users.yml b/tasks/users.yml index 8ba42f4..559d0ab 100644 --- a/tasks/users.yml +++ b/tasks/users.yml @@ -67,9 +67,23 @@ password: "{{ rabbitmq_mbs_password }}" update_password: always vhost: mbs - configure_priv: "^$" - read_priv: "^$" - write_priv: "^$" + configure_priv: "^*" + read_priv: "^*" + write_priv: "^*" when: - "'rabbitmq001' in inventory_hostname" - rabbitmq_mbs_password is defined + +# Add distrobuild +- name: Create distrobuild User + community.rabbitmq.rabbitmq_user: + user: "distrobuild" + password: "{{ rabbitmq_mbs_password }}" + update_password: always + vhost: distrobuild + configure_priv: "^*" + read_priv: "^*" + write_priv: "^*" + when: + - "'rabbitmq001' in inventory_hostname" + - rabbitmq_distrobuild_password is defined diff --git a/tasks/vhosts.yml b/tasks/vhosts.yml index ead0fe0..bcc9f48 100644 --- a/tasks/vhosts.yml +++ b/tasks/vhosts.yml @@ -82,3 +82,27 @@ vhost: mbs tags: - rabbitmq_cluster + +- name: Configure distrobuild vhost + run_once: true + delegate_to: "{{ rabbitmq_cluster_list[0] }}" + community.rabbitmq.rabbitmq_vhost: + name: distrobuild + state: present + tags: + - rabbitmq_cluster + +- name: Configure MBS HA Policy + run_once: true + delegate_to: "{{ rabbitmq_cluster_list[0] }}" + community.rabbitmq.rabbitmq_policy: + apply_to: queues + name: HA + pattern: ".*" + tags: + ha-mode: all + ha-sync-mode: automatic + ha-sync-batch-size: 10000 + vhost: distrobuild + tags: + - rabbitmq_cluster