aboutsummaryrefslogtreecommitdiff
path: root/manifests/init.pp
diff options
context:
space:
mode:
authormh <mh@immerda.ch>2009-02-21 16:36:36 +0000
committerMicah Anderson <micah@riseup.net>2009-12-07 16:03:46 -0500
commite3cb846f323a7600607ae42238fcfc7cdca90a24 (patch)
tree656396e0a8d8ddc08fb21d1ec5fa73d89c3bc58b /manifests/init.pp
parentd92fa7579311b85bf6d02724089b97e5d3a4dcd5 (diff)
downloadpuppet-sshd-e3cb846f323a7600607ae42238fcfc7cdca90a24.tar.gz
puppet-sshd-e3cb846f323a7600607ae42238fcfc7cdca90a24.tar.bz2
try if setting a target fixes the problem
Diffstat (limited to 'manifests/init.pp')
-rw-r--r--manifests/init.pp21
1 files changed, 13 insertions, 8 deletions
diff --git a/manifests/init.pp b/manifests/init.pp
index d050050..4e5f824 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -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,
- }
- }
- }
}