rendered paste bodydefine ssh-authorized-keys ($authorizedkeys="standard-authorized-keys") {
$homedir = $name ? {
root => "/root",
default => "/home/$name"
}
file {
"$homedir/.ssh":
ensure => directory,
owner => "$name",
group => "$name",
mode => 0700;
"$homedir/.ssh/authorized_keys":
owner => "$name",
group => "$name",
mode => 0600,
source => "puppet://puppet.dmacc.net/files/ssh/$authorizedkeys",
require => [ File["$homedir/.ssh"], Package["openssh-clients"] ];
}
}
$rancidhomedir = "/home/rancid"
class rancid-user {
group {
"rancid":
ensure => present;
}
user {
"rancid":
ensure => present,
gid => "rancid",
home => "$rancidhomedir",
comment => "RANCID",
shell => "/bin/bash",
require => [ Group["rancid"] ];
}
ssh-authorized-keys {
"rancid":
authorizedkeys => "rancid-authorized-keys";
}
}