summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--manifests/init.pp10
1 files changed, 6 insertions, 4 deletions
diff --git a/manifests/init.pp b/manifests/init.pp
index 5de4ce7..4826fd2 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -7,7 +7,7 @@
#
class user {
- define manage(
+ define manage(
$ensure = present,
$uid = 'absent',
$gid = 'uid',
@@ -19,6 +19,7 @@ class user {
$password = 'absent',
$shell = 'absent',
$sshkey = 'absent',
+ $sshkey_options = '',
$sshkey_type = 'absent',
$membership = 'minimum',
$ticket = false,
@@ -35,12 +36,12 @@ class user {
'absent' => "/home/$name",
default => $homedir,
}
-
+
$real_name_comment = $comment ? {
'absent' => $name,
default => $comment,
}
-
+
$real_sshkey_type = $sshkey_type ? {
'absent' => "ssh-rsa",
default => $sshkey_type,
@@ -117,7 +118,7 @@ class user {
} else {
$real_uid = false
}
-
+
if $gid != 'absent' {
if $gid == 'uid' {
if $uid != 'absent' {
@@ -168,6 +169,7 @@ class user {
ensure => $ensure,
key => $sshkey,
user => $title,
+ options => $sshkey_options,
type => $real_sshkey_type,
target => "$real_homedir/.ssh/authorized_keys",
require => User["$title"],