1
0
Fork 0
forked from infra/ansible

ELNBuildSync: Fix AMQP configuration

Feedback from code review:

* Drop unused routing key
* Remove hardcoded .prod.
* Sync with queue_routing_keys in the playbook
* Properly interpret Jinja variables

Signed-off-by: Stephen Gallagher <sgallagh@redhat.com>

rh-pre-commit.version: 2.4.0
rh-pre-commit.check-secrets: ENABLED
This commit is contained in:
Stephen Gallagher 2026-06-10 14:50:33 -04:00 committed by James Antill
commit 63101653a1
3 changed files with 6 additions and 7 deletions

View file

@ -51,7 +51,6 @@
- "#.buildsys.repo.done"
- "#.buildsys.tag"
- "#.buildsys.task.state.change"
- "org.fedoraproject.{{ env_short }}.elnbuildsync.#"
tags:
- config
- fedora-messaging

View file

@ -2,7 +2,7 @@
# which simply prints messages to standard output.
#
# This file is in the TOML format.
amqp_url = "amqps://elnbuildsync:@rabbitmq{{ env_suffix}}.fedoraproject.org/%2Fpubsub"
amqp_url = "amqps://elnbuildsync{{ env_suffix }}:@rabbitmq{{ env_suffix}}.fedoraproject.org/%2Fpubsub"
callback = "fedora_messaging.example:printer"
passive_declares = true
@ -44,10 +44,10 @@ arguments = {}
queue = "elnbuildsync{{ env_suffix }}"
exchange = "amq.topic"
routing_keys = [
"org.fedoraproject.prod.buildsys.repo.init",
"org.fedoraproject.prod.buildsys.repo.done",
"org.fedoraproject.prod.buildsys.tag",
"org.fedoraproject.prod.buildsys.task.state.change"
"#.buildsys.repo.init",
"#.buildsys.repo.done",
"#.buildsys.tag",
"#.buildsys.task.state.change"
]
[consumer_config]

View file

@ -4,7 +4,7 @@ metadata:
name: fedora-messaging-config
stringData:
config.toml: |-
{{ load_file('fedora-messaging-config.toml') | indent(4) }}
{{ lookup('template', 'fedora-messaging-config.toml') | indent(4) }}
cacert.pem: |-
{{ (env == 'staging') | ternary(ebs_fedora_messaging_stg_cacert, ebs_fedora_messaging_cacert) | indent(4) }}
elnbuildsync.crt: |-