From 53c3079bde442032767016d7944ddfe73b9bf1fe Mon Sep 17 00:00:00 2001 From: Kevin Carter Date: Thu, 7 Feb 2019 22:32:50 +0000 Subject: [PATCH] Correct notification driver The notification driver setup was resulting in the driver and connection string on the same line. This is caused by the case statement and how jinja formats the template when a case statement is present. This change modifies how the driver string is created using a ternary, which will eliminate the case statement and render the value of the diver correctly. Change-Id: I8bb44ec141a19793b0c8d84bccf799c0e8f4cc4d Signed-off-by: Kevin Carter --- templates/heat.conf.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/heat.conf.j2 b/templates/heat.conf.j2 index 5d4610d..ed436e0 100644 --- a/templates/heat.conf.j2 +++ b/templates/heat.conf.j2 @@ -68,7 +68,7 @@ enable_proxy_headers_parsing = True # Ceilometer options [oslo_messaging_notifications] -driver = {% if heat_ceilometer_enabled %}messagingv2{% else %}noop{% endif %} +driver = {{ (heat_ceilometer_enabled | bool) | ternary('messagingv2', 'noop') }} transport_url = {{ heat_oslomsg_notify_transport }}://{% for host in heat_oslomsg_notify_servers.split(',') %}{{ heat_oslomsg_notify_userid }}:{{ heat_oslomsg_notify_password }}@{{ host }}:{{ heat_oslomsg_notify_port }}{% if not loop.last %},{% else %}/{{ heat_oslomsg_notify_vhost }}{% if heat_oslomsg_notify_use_ssl | bool %}?ssl=1{% else %}?ssl=0{% endif %}{% endif %}{% endfor %}