forked from redhat-openstack/openstack-puppet-modules
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rabbitmqadmin.pp
34 lines (29 loc) · 953 Bytes
/
rabbitmqadmin.pp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#
class rabbitmq::install::rabbitmqadmin {
if($rabbitmq::ssl) {
$management_port = $rabbitmq::ssl_management_port
}
else {
$management_port = $rabbitmq::management_port
}
$default_user = $rabbitmq::default_user
$default_pass = $rabbitmq::default_pass
$protocol = $rabbitmq::ssl ? { false => 'http', default => 'https' }
staging::file { 'rabbitmqadmin':
target => '/var/lib/rabbitmq/rabbitmqadmin',
source => "${protocol}://${default_user}:${default_pass}@localhost:${management_port}/cli/rabbitmqadmin",
curl_option => '-k --noproxy localhost',
wget_option => '--no-proxy',
require => [
Class['rabbitmq::service'],
Rabbitmq_plugin['rabbitmq_management']
],
}
file { '/usr/local/bin/rabbitmqadmin':
owner => 'root',
group => 'root',
source => '/var/lib/rabbitmq/rabbitmqadmin',
mode => '0755',
require => Staging::File['rabbitmqadmin'],
}
}