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..9fb9215ffead864d9ebc2f1afce5ab5e10c0833e |
--- /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 leixcal SHA1 hashsum. If undefined, Puppet |
Fred
2016/01/13 17:14:33
Typo: lexical
mathias
2016/01/13 17:27:13
Done.
|
+# 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, |
+ } |
+} |