From 0bd0b0a65a32ee02f28651e5295819a3a6571513 Mon Sep 17 00:00:00 2001 From: Mike Dorman Date: Thu, 4 Sep 2014 14:58:41 -0600 Subject: [PATCH 1/2] Use https to download rabbitmqadmin tool when $rabbitmq::ssl => true If $rabbitmq::admin_enable is set, the rabbitmqadmin tool is downloaded via a http URL on the RabbitMQ management service. However, this fails when $rabbitmq::ssl is set, because in that case the managment service is configured for https only (there is no http listener.) --- manifests/install/rabbitmqadmin.pp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/manifests/install/rabbitmqadmin.pp b/manifests/install/rabbitmqadmin.pp index 12767885c..6d4cccf01 100644 --- a/manifests/install/rabbitmqadmin.pp +++ b/manifests/install/rabbitmqadmin.pp @@ -4,10 +4,11 @@ $management_port = $rabbitmq::management_port $default_user = $rabbitmq::default_user $default_pass = $rabbitmq::default_pass + $protocol = $rabbitmq::ssl ? { 'true' => 'https', default => 'http' } staging::file { 'rabbitmqadmin': target => '/var/lib/rabbitmq/rabbitmqadmin', - source => "http://${default_user}:${default_pass}@localhost:${management_port}/cli/rabbitmqadmin", + source => "${protocol}://${default_user}:${default_pass}@localhost:${management_port}/cli/rabbitmqadmin", require => [ Class['rabbitmq::service'], Rabbitmq_plugin['rabbitmq_management'] From f0cdd149e99f6b73fcdcbc2d822dddc01a1d8578 Mon Sep 17 00:00:00 2001 From: Mike Dorman Date: Thu, 4 Sep 2014 15:11:31 -0600 Subject: [PATCH 2/2] Proper bool logic --- manifests/install/rabbitmqadmin.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifests/install/rabbitmqadmin.pp b/manifests/install/rabbitmqadmin.pp index 6d4cccf01..184a5258d 100644 --- a/manifests/install/rabbitmqadmin.pp +++ b/manifests/install/rabbitmqadmin.pp @@ -4,7 +4,7 @@ $management_port = $rabbitmq::management_port $default_user = $rabbitmq::default_user $default_pass = $rabbitmq::default_pass - $protocol = $rabbitmq::ssl ? { 'true' => 'https', default => 'http' } + $protocol = $rabbitmq::ssl ? { false => 'http', default => 'https' } staging::file { 'rabbitmqadmin': target => '/var/lib/rabbitmq/rabbitmqadmin',