]> git.donarmstrong.com Git - dsa-puppet.git/blob - modules/ssh/manifests/init.pp
what can possibly go wrong
[dsa-puppet.git] / modules / ssh / manifests / init.pp
1 class ssh {
2         package {
3                 openssh-client: ensure => installed;
4                 openssh-server: ensure => installed;
5         }
6
7         file { "/etc/ssh/ssh_config":
8                 source  => [ "puppet:///ssh/ssh_config" ],
9                 require => Package["openssh-client"]
10                 ;
11                "/etc/ssh/sshd_config":
12                 content => template("ssh/sshd_config.erb"),
13                 require => Package["openssh-server"],
14                 notify  => Exec["ssh restart"]
15                 ;
16               "/etc/ssh/userkeys/root":
17                 content => template("ssh/authorized_keys.erb" ],
18                 mode    => 444,
19                 require => Package["openssh-server"]
20                 ;
21         }
22
23         exec { "ssh restart":
24             path        => "/etc/init.d:/usr/bin:/usr/sbin:/bin:/sbin",
25             refreshonly => true,
26         }
27 }