add distrobuild

This commit is contained in:
nazunalika 2021-02-23 11:17:09 -07:00
parent aeda3e2bcf
commit 796e1db0b7
Signed by: label
GPG Key ID: CB6D9706D138D190
2 changed files with 41 additions and 3 deletions

View File

@ -67,9 +67,23 @@
password: "{{ rabbitmq_mbs_password }}" password: "{{ rabbitmq_mbs_password }}"
update_password: always update_password: always
vhost: mbs vhost: mbs
configure_priv: "^$" configure_priv: "^*"
read_priv: "^$" read_priv: "^*"
write_priv: "^$" write_priv: "^*"
when: when:
- "'rabbitmq001' in inventory_hostname" - "'rabbitmq001' in inventory_hostname"
- rabbitmq_mbs_password is defined - 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

View File

@ -82,3 +82,27 @@
vhost: mbs vhost: mbs
tags: tags:
- rabbitmq_cluster - 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