try if setting a target fixes the problem

This commit is contained in:
mh 2009-02-21 16:36:36 +00:00 committed by Micah Anderson
parent d92fa75793
commit e3cb846f32

View file

@ -290,10 +290,23 @@ define sshd::ssh_authorized_key(
$target = 'absent',
$options = 'absent'
){
case $target {
'absent': {
case $user {
'root': { $real_target = '/root/.ssh/authorized_keys' }
'default': { $real_target = "/home/${user}/.ssh/authorized_keys" }
}
}
default: {
$real_target = $target
}
}
ssh_authorized_key{$name:
type => $type,
key => $key,
user => $user,
target => $real_target,
}
case $options {
@ -304,12 +317,4 @@ define sshd::ssh_authorized_key(
}
}
}
case $target {
'absent': { info("not setting any target for ssh_authorized_key: $name") }
default: {
Ssh_authorized_key[$name]{
target => $target,
}
}
}
}