Index: modules/adblockplus/manifests/user.pp |
diff --git a/modules/adblockplus/manifests/user.pp b/modules/adblockplus/manifests/user.pp |
new file mode 100644 |
index 0000000000000000000000000000000000000000..fe0f0a0d74b43f38b5aba7ff104f4c60d71ef2fd |
--- /dev/null |
+++ b/modules/adblockplus/manifests/user.pp |
@@ -0,0 +1,48 @@ |
+# == Type: adblockplus::user |
+# |
+# Manage user accounts. |
+# |
+# === Parameters: |
+# |
+# [*authorized_keys*] |
+# A list of zero or more lines for the ~/.ssh/authorized_keys file of |
+# the respective user. Used as-is, joined by newline characters. |
+# |
+# [*groups*] |
+# A list of zero or more groups (names), to assign the user to. |
+# |
+# [*name*] |
+# The name of the user account, defaults to $title. |
+# |
+# [*password_hash*] |
+# The user's password, as lexical SHA1 hashsum. If undefined, Puppet |
+# won't change the current one, if any. Use "*" to disable the user's |
+# password explicitly. |
+# |
+# === Examples: |
+# |
+# adblockplus::user {'pinocchio': |
+# authorized_keys => [ |
+# 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAA..................', |
+# 'from="10.0.8.2" ssh-rsa AAAAB3NzaC..................', |
+# ], |
+# groups => ['sudo', 'adm'], |
+# password_hash => '$6$k.fe9F4U$OIav.SJ..................', |
+# } |
+# |
+define adblockplus::user ( |
+ $authorized_keys = [], |
+ $groups = [], |
+ $password_hash = undef, |
+) { |
+ |
+ include adblockplus |
+ include users |
+ |
+ users::user {"adblockplus::user#$name": |
+ authorized_keys => join($authorized_keys, "\n"), |
+ groups => $groups, |
+ password => $password_hash, |
+ user_name => $name, |
+ } |
+} |