undef or '' as default
This commit is contained in:
parent
bdf7bd334e
commit
217a4e2566
1 changed files with 3 additions and 3 deletions
|
@ -9,13 +9,13 @@ define sshd::ssh_authorized_key(
|
|||
|
||||
$real_user = $user ? {
|
||||
false => $name,
|
||||
"" => $name,
|
||||
'' => $name,
|
||||
default => $user,
|
||||
}
|
||||
|
||||
case $target {
|
||||
undef: {
|
||||
case $user {
|
||||
undef,'': {
|
||||
case $real_user {
|
||||
'root': { $real_target = '/root/.ssh/authorized_keys' }
|
||||
default: { $real_target = "/home/${user}/.ssh/authorized_keys" }
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue