mirror of
https://github.com/rocky-linux/ansible-role-rabbitmq.git
synced 2024-12-04 10:26:26 +00:00
add mbs
This commit is contained in:
parent
c8cc4854d3
commit
bedd099d27
@ -41,3 +41,5 @@ rabbitmq_plugins:
|
||||
# Enable the public pubsub or not
|
||||
rabbitmq_enable_public: false
|
||||
#pubsub_federation_pass: ...
|
||||
|
||||
rabbitmq_mbs_password: "ThisIsNotThePassword!"
|
||||
|
@ -19,7 +19,7 @@
|
||||
vhost: "{{ vhost|default('/pubsub') }}"
|
||||
auto_delete: false
|
||||
durable: true
|
||||
message_ttl: "{{ message_ttl|default(omit)) }}"
|
||||
message_ttl: "{{ message_ttl|default(omit) }}"
|
||||
state: present
|
||||
login_user: rockyadmin
|
||||
login_password: "{{ rabbitmq_admin_password }}"
|
||||
|
@ -59,3 +59,18 @@
|
||||
- "'rabbitmq001' in inventory_hostname"
|
||||
- rabbitmq_monitoring_username 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
|
||||
|
@ -58,3 +58,27 @@
|
||||
vhost: /public_pubsub
|
||||
tags:
|
||||
- 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
|
||||
|
Loading…
Reference in New Issue
Block a user