Fixed disabling sshd on Ubuntu

This commit is contained in:
Ossi Salmi 2011-01-24 16:27:41 +02:00 committed by Timo Mkinen
parent 41059a1e2c
commit edebb3dda3
3 changed files with 79 additions and 0 deletions

View file

@ -97,7 +97,32 @@ class ssh::hostkeys {
#
class ssh::disable {
case $operatingsystem {
ubuntu: {
# fix ssh init, the sysv-rc script
# doesn't work together with upstart
file { "/etc/init.d/ssh":
ensure => link,
force => true,
target => "/lib/init/upstart-job",
backup => ".orig",
before => Service["sshd"],
}
file { "/etc/init/ssh.conf":
ensure => present,
mode => 0644,
owner => root,
group => root,
source => "puppet:///ssh/ssh.disabled.conf",
}
}
}
service { "sshd":
name => $operatingsystem ? {
ubuntu => "ssh",
default => "sshd",
},
ensure => stopped,
enable => false,
}