rabbitmq fixes

This commit is contained in:
nazunalika 2021-01-27 02:51:14 -07:00
parent d8001176c5
commit c8cc4854d3
4 changed files with 11 additions and 8 deletions

View File

@ -29,7 +29,7 @@
include_tasks: runners/mkqueue.yml
vars:
username: "osci-pipeline-{{ rabbitmq_env }}"
queue_name: "{{ item }}-{{ rabbitmq_env }}"
queue_name: "{{ item }}"
message_ttl: 432000000
routing_keys:
- "org.rockylinux.ci.#"

View File

@ -48,7 +48,7 @@
vhost: /public_pubsub
when:
- rabbitmq_enable_public
- pubsub_federation_pass
- pubsub_federation_pass is defined
- name: Configure a policy to federate the topic exchange to public
run_once: true
@ -63,4 +63,4 @@
vhost: /public_pubsub
when:
- rabbitmq_enable_public
- pubsub_federation_pass
- pubsub_federation_pass is defined

View File

@ -5,7 +5,7 @@
community.rabbitmq.rabbitmq_user:
user: "{{ username }}"
vhost: "{{ vhost|default('/pubsub') }}"
read_priv: "^(zmq\\.topic)|^(amq\\.topic)|({{ username }}.*)$"
read_priv: "^(zmq\\.topic)|^(amq\\.topic)|({{ username }}.*)$"
write_priv: "^(amq\\.topic)|({{ username }}.*){% for queue in write_queues|default([]) %}|({{ queue }}.*){% endfor %}$"
configure_priv: "^$"
state: present
@ -19,7 +19,7 @@
vhost: "{{ vhost|default('/pubsub') }}"
auto_delete: false
durable: true
message_ttl: "{{ message_ttl|default('null') }}"
message_ttl: "{{ message_ttl|default(omit)) }}"
state: present
login_user: rockyadmin
login_password: "{{ rabbitmq_admin_password }}"
@ -32,10 +32,13 @@
name: "amq.topic"
destination: "{{ queue_name }}"
destination_type: queue
routing_key: "{{ item }}"
routing_key: "{{ routing_item }}"
vhost: "{{ vhost|default('/pubsub') }}"
state: present
login_user: rockyadmin
login_password: "{{ rabbitmq_admin_password }}"
loop: '{{ routing_keys }}'
loop_control:
loop_var: routing_item
tags:
- rabbitmq

View File

@ -57,5 +57,5 @@
tags: monitoring
when:
- "'rabbitmq001' in inventory_hostname"
- rabbitmq_monitoring_username
- rabbitmq_monitoring_password
- rabbitmq_monitoring_username is defined
- rabbitmq_monitoring_password is defined