]> gitweb.fluxo.info Git - puppet-sshd.git/commitdiff
ssh_authorized_key: use $name for user by default
authorGabriel Filion <lelutin@gmail.com>
Thu, 20 Jan 2011 07:25:32 +0000 (02:25 -0500)
committerGabriel Filion <lelutin@gmail.com>
Mon, 31 Jan 2011 02:15:35 +0000 (21:15 -0500)
Currently ssh_authorized_key has some logic about $user being false or
'', but it sets its value to default to 'root'.
So, in order to use the name as the user's name, one has to clear the
user parameter, which is totally redundant.

Since it is sometimes useful to publish multiple keys for a user, the
$user parameter is useful.

To make using ssh_authorized_key for one-key normal users simpler, make
$user default to being empty (which will use $name as the user name).
'root' can always be specified either via the name or by the $user
paramter.

Signed-off-by: Gabriel Filion <lelutin@gmail.com>
manifests/ssh_authorized_key.pp

index 575b65421d616cd4b006b584d715405f7a8b04c2..40649b0b3758f91db1b6e9fe56654c494103b1a0 100644 (file)
@@ -3,7 +3,7 @@ define sshd::ssh_authorized_key(
     $ensure = 'present',
     $type = 'ssh-dss',
     $key = 'absent',
-    $user = 'root',
+    $user = '',
     $target = undef,
     $options = 'absent'
 ){