
rabbitmq_class was deprecated in the previous release, this patch drop it. That means: * we are not installing rabbitmq service anymore. * rabbitmq_class parameter is deleted * port, cluster_disk_nodes and enabled parameters are deprecated for backward compatibility but port and cluster_disk_nodes have no effect since we don't install rabbitmq anymore. * unit tests are updated Change-Id: I01b1dcaeef55c2a5c07f7c2c4b0ad7433eceee7b Co-Authored-By: Emilien Macchi <emilien@redhat.com>
63 lines
1.6 KiB
Puppet
63 lines
1.6 KiB
Puppet
# == Class: manila::rabbitmq
|
|
#
|
|
# Installs and manages rabbitmq server for manila
|
|
#
|
|
# == Parameters:
|
|
#
|
|
# [*userid*]
|
|
# (optional) The username to use when connecting to Rabbit
|
|
# Defaults to 'guest'
|
|
#
|
|
# [*password*]
|
|
# (optional) The password to use when connecting to Rabbit
|
|
# Defaults to 'guest'
|
|
#
|
|
# [*port*]
|
|
# (optional) Deprecated. The port to use when connecting to Rabbit
|
|
# This parameter keeps backward compatibility when we used to manage
|
|
# RabbitMQ service.
|
|
# Defaults to '5672'
|
|
#
|
|
# [*virtual_host*]
|
|
# (optional) The virtual host to use when connecting to Rabbit
|
|
# Defaults to '/'
|
|
#
|
|
# [*enabled*]
|
|
# (optional) Deprecated. Whether to enable the Rabbit resources
|
|
# This parameter keeps backward compatibility when we used to manage
|
|
# RabbitMQ service.
|
|
# Defaults to true
|
|
#
|
|
class manila::rabbitmq(
|
|
$userid = 'guest',
|
|
$password = 'guest',
|
|
$virtual_host = '/',
|
|
# DEPRECATED PARAMETER
|
|
$enabled = true,
|
|
$port = '5672',
|
|
) {
|
|
|
|
if ($enabled) {
|
|
if $userid == 'guest' {
|
|
$delete_guest_user = false
|
|
} else {
|
|
$delete_guest_user = true
|
|
rabbitmq_user { $userid:
|
|
admin => true,
|
|
password => $password,
|
|
provider => 'rabbitmqctl',
|
|
}
|
|
# I need to figure out the appropriate permissions
|
|
rabbitmq_user_permissions { "${userid}@${virtual_host}":
|
|
configure_permission => '.*',
|
|
write_permission => '.*',
|
|
read_permission => '.*',
|
|
provider => 'rabbitmqctl',
|
|
}->Anchor<| title == 'manila-start' |>
|
|
}
|
|
rabbitmq_vhost { $virtual_host:
|
|
provider => 'rabbitmqctl',
|
|
}
|
|
}
|
|
}
|