2017-09-15 08:33:55 -04:00
|
|
|
# Create a message queue user for a service
|
|
|
|
#
|
|
|
|
# [*password*]
|
|
|
|
# The password for the message queue account
|
|
|
|
#
|
|
|
|
# [*admin*]
|
|
|
|
# (optional) If the acconut is an admin account
|
|
|
|
# Defaults to true
|
|
|
|
#
|
|
|
|
# [*vhost*]
|
|
|
|
# The virtual host assigned to the user
|
|
|
|
# Defaults to /
|
|
|
|
#
|
|
|
|
define openstack_integration::mq_user (
|
|
|
|
$password,
|
|
|
|
$admin = true,
|
|
|
|
$vhost = '/',
|
|
|
|
) {
|
2019-12-08 12:59:28 +01:00
|
|
|
|
|
|
|
include openstack_integration::config
|
|
|
|
include openstack_integration::rabbitmq
|
2017-09-15 08:33:55 -04:00
|
|
|
|
|
|
|
rabbitmq_user { $name:
|
|
|
|
admin => $admin,
|
|
|
|
password => $password,
|
|
|
|
provider => 'rabbitmqctl',
|
2019-12-08 12:59:28 +01:00
|
|
|
require => Class['rabbitmq'],
|
2017-09-15 08:33:55 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
rabbitmq_user_permissions { "${name}@${vhost}":
|
|
|
|
configure_permission => '.*',
|
|
|
|
write_permission => '.*',
|
|
|
|
read_permission => '.*',
|
|
|
|
provider => 'rabbitmqctl',
|
2019-12-08 12:59:28 +01:00
|
|
|
require => Class['rabbitmq'],
|
2017-09-15 08:33:55 -04:00
|
|
|
}
|
2019-12-08 12:59:28 +01:00
|
|
|
}
|