From ccf3b23cd4d95778374f7a8cbc3891da97ba21c8 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Tue, 7 Jun 2022 13:35:07 -0700 Subject: [PATCH] openqa/server: skip openqa.ini amqp section if vars not set We don't want to include this section if the vars aren't set. Not every openQA server has to be an AMQP publisher. Signed-off-by: Adam Williamson --- roles/openqa/server/templates/openqa.ini.j2 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/roles/openqa/server/templates/openqa.ini.j2 b/roles/openqa/server/templates/openqa.ini.j2 index 45f3df2039..07b2cfce6f 100644 --- a/roles/openqa/server/templates/openqa.ini.j2 +++ b/roles/openqa/server/templates/openqa.ini.j2 @@ -9,6 +9,7 @@ plugins = {{ openqa_webapi_plugins }} hide_asset_types = repo hdd parallel_cancel_whole_cluster = 0 +{% if openqa_amqp_publisher_url is defined and openqa_amqp_publisher_url %} [amqp] topic_prefix = {{ openqa_amqp_publisher_prefix }} url = {{ openqa_amqp_publisher_url }} @@ -18,6 +19,7 @@ cacertfile = {{ openqa_amqp_publisher_cacertfile }} certfile = {{ openqa_amqp_publisher_certfile }} keyfile = {{ openqa_amqp_publisher_keyfile }} {% endif %} +{% endif %} [audit/storage_duration] startup = 7