diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2015-07-14 13:56:31 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2015-07-14 13:56:31 -0300 |
commit | 9be7cf362a93a8599184b674b94d4be46d4b8328 (patch) | |
tree | 300bac99fb378bc462d63c965c955d1052188bb3 | |
parent | 93247a4ad2c2f49b538e3a738e14d29223c1c94b (diff) | |
download | puppet-user-9be7cf362a93a8599184b674b94d4be46d4b8328.tar.gz puppet-user-9be7cf362a93a8599184b674b94d4be46d4b8328.tar.bz2 |
New param sshkey_options
-rw-r--r-- | manifests/init.pp | 10 |
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"], |