aboutsummaryrefslogtreecommitdiffstats
path: root/modules/openssh/manifests/symlink_user.pp
blob: f2e107b1c3b10f50abd8117ac345e1ba354b3924 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
define openssh::symlink_user() {
    include openssh::pubkeys_directory
    $pubkeys_directory = $openssh::pubkeys_directory::pubkeys_directory
    file { "$pubkeys_directory/$name":
        ensure => directory,
        owner  => $name,
        group  => $name,
        mode   => '0700',
    }

    file { "$pubkeys_directory/$name/authorized_keys":
        # FIXME : fragile approximation for $HOME
        ensure => link,
        target => "/home/$name/.ssh/authorized_keys",
        mode   => '0700',
    }
}