Skip to content

Commit

Permalink
fix rabbitmq ssl config
Browse files Browse the repository at this point in the history
The intent, per the comments in the module, is that $sensu::rabbitmq_ssl
would be set to true if you set either a certificate or a key. That var
defaults to false. Current code does not actually override this value.
When the sensu_rabbitmq_config is called, it directly references this var,
so unless you've specifically set it in your config, it's always false.
This makes it behave the way the module comments describe.
  • Loading branch information
Patrick Gilbert authored and Patrick Gilbert committed Nov 13, 2014
1 parent 683ad19 commit 30bd3f2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion manifests/rabbitmq/config.pp
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,11 @@
} else {
$ssl_private_key = $sensu::rabbitmq_ssl_private_key
}
$enable_ssl = true
} else {
$ssl_cert_chain = undef
$ssl_private_key = undef
$enable_ssl = $sensu::rabbitmq_ssl
}

file { '/etc/sensu/conf.d/rabbitmq.json':
Expand All @@ -74,7 +76,7 @@
user => $sensu::rabbitmq_user,
password => $sensu::rabbitmq_password,
vhost => $sensu::rabbitmq_vhost,
ssl_transport => $sensu::rabbitmq_ssl,
ssl_transport => $enable_ssl,
ssl_cert_chain => $ssl_cert_chain,
ssl_private_key => $ssl_private_key,
}
Expand Down

0 comments on commit 30bd3f2

Please sign in to comment.