Skip to content

Commit

Permalink
Output cacertfile value only if it is set
Browse files Browse the repository at this point in the history
When using verify_none cacertfile can be omitted. Therefore no value should be written if it is unset.
  • Loading branch information
ArloL committed Oct 17, 2014
1 parent 54e1d2c commit c7a1cbb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions templates/rabbitmq.config.erb
Original file line number Diff line number Diff line change
Expand Up @@ -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 %>},
Expand All @@ -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 -%>
Expand Down

0 comments on commit c7a1cbb

Please sign in to comment.