Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: modules/adblockplus/manifests/user.pp

Issue 29333430: Issue 3508 - Introduce class adblockplus::user (Closed)
Patch Set: Created Jan. 13, 2016, 12:31 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « modules/adblockplus/manifests/init.pp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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,
+ }
+}
« no previous file with comments | « modules/adblockplus/manifests/init.pp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld