From: Martin Zobel-Helas Date: Sun, 31 May 2015 19:38:41 +0000 (+0000) Subject: add pubsub::autouser X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=929ba594dda6edaac93530b52b23fbac0a9be8aa;p=dsa-puppet.git add pubsub::autouser Signed-off-by: Martin Zobel-Helas --- diff --git a/modules/pubsub/manifest/autouser.pp b/modules/pubsub/manifest/autouser.pp new file mode 100644 index 00000000..2a27cda6 --- /dev/null +++ b/modules/pubsub/manifest/autouser.pp @@ -0,0 +1,27 @@ +# == Define: pubsub::autouser +# +# Create a user in rabbitmq automatically for debian.org hosts +# Should automatically create a password +# +# === Parameters +# +# === Examples +# +# pubsub::autouser { 'master.debian.org': } +# +define pubsub::autouser () { + + $pubsub_password = hkdf('/etc/puppet/secret', "mq-client-${name}") + + rabbitmq_user { $name: + admin => false, + password => $pubsub_password, + } + + rabbitmq_user_permissions { "${name}@dsa": + configure_permission => '.*', + read_permission => '.*', + write_permission => '.*', + } +} +