]> git.donarmstrong.com Git - dsa-puppet.git/blob - modules/rabbitmq/manifests/autouser.pp
create users for debian.org hosts
[dsa-puppet.git] / modules / rabbitmq / manifests / autouser.pp
1 # == Define: rabbitmq::autouser
2 #
3 # Create a user in rabbitmq automatically for debian.org hosts
4 # Should automatically create a password
5 #
6 # === Parameters
7 #
8 # === Examples
9 #
10 #  rabbitmq::autouser { 'master.debian.org': }
11 #
12 define rabbitmq::autouser () {
13
14         $rabbit_password = hkdf('/etc/puppet/secret', "mq-client-${name}")
15
16         rabbitmq_user { $name:
17                 admin    => false,
18                 password => $rabbit_password,
19                 provider => 'rabbitmqctl',
20         }
21 }