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 include_tasks: runners/mkqueue.yml
vars: vars:
username: "osci-pipeline-{{ rabbitmq_env }}" username: "osci-pipeline-{{ rabbitmq_env }}"
queue_name: "{{ item }}-{{ rabbitmq_env }}" queue_name: "{{ item }}"
message_ttl: 432000000 message_ttl: 432000000
routing_keys: routing_keys:
- "org.rockylinux.ci.#" - "org.rockylinux.ci.#"

View File

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

View File

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

View File

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