diff --git a/roles/bodhi2/base/templates/fedora-messaging.toml.j2 b/roles/bodhi2/base/templates/fedora-messaging.toml.j2 index 24f6fd56c3..25d04e6ae2 100644 --- a/roles/bodhi2/base/templates/fedora-messaging.toml.j2 +++ b/roles/bodhi2/base/templates/fedora-messaging.toml.j2 @@ -9,7 +9,6 @@ topic_prefix = "org.fedoraproject.prod" publish_exchange = "amq.topic" passive_declares = false -callback = "bodhi.server.consumers:messaging_callback" [tls] @@ -22,6 +21,9 @@ certfile = "/etc/fedora-messaging/bodhi-cert.pem" app = "bodhi" +## If bodhi_message_routing_keys is defined, this must be a consumer so let's also set up the consumer +## config. +{% if bodhi_message_routing_keys %} [queues."bodhi{{ env_suffix }}"] durable = true auto_delete = false @@ -38,6 +40,8 @@ routing_keys = [ {% endfor %} ] +callback = "bodhi.server.consumers:messaging_callback" + [log_config] version = 1 @@ -105,3 +109,6 @@ handlers = ["console", "email"] [log_config.root] level = "ERROR" handlers = ["console", "email"] + +## End consumer config if statement +{% endif %}