This commit is contained in:
nazunalika 2021-01-28 14:09:24 -07:00
parent c8cc4854d3
commit bedd099d27
4 changed files with 42 additions and 1 deletions

View File

@ -41,3 +41,5 @@ rabbitmq_plugins:
# Enable the public pubsub or not # Enable the public pubsub or not
rabbitmq_enable_public: false rabbitmq_enable_public: false
#pubsub_federation_pass: ... #pubsub_federation_pass: ...
rabbitmq_mbs_password: "ThisIsNotThePassword!"

View File

@ -19,7 +19,7 @@
vhost: "{{ vhost|default('/pubsub') }}" vhost: "{{ vhost|default('/pubsub') }}"
auto_delete: false auto_delete: false
durable: true durable: true
message_ttl: "{{ message_ttl|default(omit)) }}" message_ttl: "{{ message_ttl|default(omit) }}"
state: present state: present
login_user: rockyadmin login_user: rockyadmin
login_password: "{{ rabbitmq_admin_password }}" login_password: "{{ rabbitmq_admin_password }}"

View File

@ -59,3 +59,18 @@
- "'rabbitmq001' in inventory_hostname" - "'rabbitmq001' in inventory_hostname"
- rabbitmq_monitoring_username is defined - rabbitmq_monitoring_username is defined
- rabbitmq_monitoring_password is defined - rabbitmq_monitoring_password is defined
# Add MBS
- name: Create MBS User
community.rabbitmq.rabbitmq_user:
user: "mbs"
password: "{{ rabbitmq_mbs_password }}"
update_password: always
vhost: /mbs
configure_priv: "^$"
read_priv: "^$"
write_priv: "^$"
when:
- "'rabbitmq001' in inventory_hostname"
- rabbitmq_monitoring_username is defined
- rabbitmq_monitoring_password is defined

View File

@ -58,3 +58,27 @@
vhost: /public_pubsub vhost: /public_pubsub
tags: tags:
- rabbitmq_cluster - rabbitmq_cluster
- name: Configure MBS vhost
run_once: true
delegate_to: "{{ rabbitmq_cluster_list[0] }}"
community.rabbitmq.rabbitmq_vhost:
name: /mbs
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: /mbs
tags:
- rabbitmq_cluster