puppet-cinder/manifests/rabbitmq.pp
Cody Herriges 46e46998d0 Remove code deprecated in liberty cycle
This commit removes all code that was related to deprecations,
  including tests put in during the liberty release cycle and
  increases the verbosity of warnings provided for code deprecated
  during this cycle (Mitaka).

Change-Id: I991654c6c0706eea31a6702703596e73080bec4e
2016-01-26 14:14:04 -08:00

52 lines
1.3 KiB
Puppet

# == Class: cinder::rabbitmq
#
# Installs and manages rabbitmq server for cinder
#
# == 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 '/'
#
class cinder::rabbitmq(
$userid = 'guest',
$password = 'guest',
$virtual_host = '/',
) {
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 == 'cinder-start' |>
}
rabbitmq_vhost { $virtual_host:
provider => 'rabbitmqctl',
}
}