puppet-openstack-integration/manifests/mq_user.pp
Tobias Urdin 81687e2ead Convert all class usage to relative names
In Puppet 3 there was a need to use absolute
names to prevent issues. Since Puppet 4 everything
is absolute by default which makes this not needed.

We need to change this everywhere so that we can
revert the pin in [1] that now prevents us from
using the latest version of the puppet-lint check
puppet-lint-absolute_classname_check that properly
checks that we dont use absolute names.

[1] https://review.opendev.org/#/c/697742/

Change-Id: I78b74fbeb08be7234189e4d266412fb7fb7a73c0
2019-12-08 14:58:12 +01:00

48 lines
1.0 KiB
Puppet

# 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 = '/',
) {
include openstack_integration::config
include openstack_integration::rabbitmq
rabbitmq_user { $name:
admin => $admin,
password => $password,
provider => 'rabbitmqctl',
require => Class['rabbitmq'],
}
rabbitmq_user_permissions { "${name}@${vhost}":
configure_permission => '.*',
write_permission => '.*',
read_permission => '.*',
provider => 'rabbitmqctl',
require => Class['rabbitmq'],
}
if $::openstack_integration::config::messaging_default_proto == 'amqp' {
include openstack_integration::qdr
qdr_user { $name:
password => $password,
provider => 'sasl',
require => Class['qdr'],
}
}
}