puppet-standalone-mashup/shared/modules/ssh/manifests/init.pp

36 lines
700 B
ObjectPascal
Raw Normal View History

2012-05-14 13:15:05 +00:00
define ssh {
$ssh_dir = "/home/${name}/.ssh"
file { $ssh_dir:
ensure => directory,
2012-05-16 10:43:53 +00:00
mode => '0700',
owner => $name,
group => $name
2012-05-14 13:15:05 +00:00
}
file { "${ssh_dir}/authorized_keys":
content => template("ssh/${name}/authorized_keys"),
require => File[$ssh_dir],
2012-05-16 10:43:53 +00:00
mode => '0644',
owner => $name,
group => $name
2012-05-14 13:15:05 +00:00
}
file { "${ssh_dir}/id_dsa":
content => template("ssh/${name}/id_dsa"),
require => File[$ssh_dir],
2012-05-16 10:43:53 +00:00
mode => '0600',
owner => $name,
group => $name
2012-05-14 13:15:05 +00:00
}
file { "${ssh_dir}/id_dsa.pub":
content => template("ssh/${name}/id_dsa.pub"),
require => File[$ssh_dir],
2012-05-16 10:43:53 +00:00
mode => '0644',
owner => $name,
group => $name
2012-05-14 13:15:05 +00:00
}
}