From c7a1cbb64e325ea1225dce124bb5d2768ce076b4 Mon Sep 17 00:00:00 2001 From: Arlo Louis O'Keeffe Date: Fri, 17 Oct 2014 11:56:12 +0200 Subject: [PATCH] Output cacertfile value only if it is set When using verify_none cacertfile can be omitted. Therefore no value should be written if it is unset. --- templates/rabbitmq.config.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/rabbitmq.config.erb b/templates/rabbitmq.config.erb index 8f6b14f75..5eea1c0fb 100644 --- a/templates/rabbitmq.config.erb +++ b/templates/rabbitmq.config.erb @@ -17,7 +17,7 @@ <%- end -%> <%- if @ssl -%> {ssl_listeners, [<%= @ssl_port %>]}, - {ssl_options, [{cacertfile,"<%= @ssl_cacert %>"}, + {ssl_options, [<%- if @ssl_cacert != 'UNSET' -%>{cacertfile,"<%= @ssl_cacert %>"},<%- end -%> {certfile,"<%= @ssl_cert %>"}, {keyfile,"<%= @ssl_key %>"}, {verify,<%= @ssl_verify %>}, @@ -41,7 +41,7 @@ <%- if @ssl -%> {port, <%= @ssl_management_port %>}, {ssl, true}, - {ssl_opts, [{cacertfile, "<%= @ssl_cacert %>"}, + {ssl_opts, [<%- if @ssl_cacert != 'UNSET' -%>{cacertfile, "<%= @ssl_cacert %>"},<%- end -%> {certfile, "<%= @ssl_cert %>"}, {keyfile, "<%= @ssl_key %>"}]} <%- else -%>