Add ubuntu support

This commit is contained in:
Alex Tu 2013-10-21 16:45:43 +08:00 committed by Garrett Honeycutt
parent fef452b803
commit 039ec10f0b

View File

@ -27,7 +27,6 @@ class ssh (
$sshd_config_xauth_location = '/usr/bin/xauth', $sshd_config_xauth_location = '/usr/bin/xauth',
$sshd_config_subsystem_sftp = 'USE_DEFAULTS', $sshd_config_subsystem_sftp = 'USE_DEFAULTS',
$service_ensure = 'running', $service_ensure = 'running',
$service_name = 'sshd',
$service_enable = 'true', $service_enable = 'true',
$service_hasrestart = 'true', $service_hasrestart = 'true',
$service_hasstatus = 'true', $service_hasstatus = 'true',
@ -71,12 +70,13 @@ class ssh (
case $::osfamily { case $::osfamily {
'RedHat': { 'RedHat': {
$default_packages = ['openssh-server', $default_packages = ['openssh-server',
'openssh-server',
'openssh-clients'] 'openssh-clients']
$default_sshd_config_subsystem_sftp = '/usr/libexec/openssh/sftp-server' $default_sshd_config_subsystem_sftp = '/usr/libexec/openssh/sftp-server'
$service_name = 'sshd'
} }
'Suse': { 'Suse': {
$default_packages = 'openssh' $default_packages = 'openssh'
$service_name = 'sshd'
case $::architecture { case $::architecture {
'x86_64': { 'x86_64': {
$default_sshd_config_subsystem_sftp = '/usr/lib64/ssh/sftp-server' $default_sshd_config_subsystem_sftp = '/usr/lib64/ssh/sftp-server'
@ -84,13 +84,20 @@ class ssh (
'i386' : { 'i386' : {
$default_sshd_config_subsystem_sftp = '/usr/lib/ssh/sftp-server' $default_sshd_config_subsystem_sftp = '/usr/lib/ssh/sftp-server'
} }
default: { default: {
fail("ssh supports architectures x86_64 and i386 for Suse. Detected architecture is <${::architecture}>.") fail("ssh supports architectures x86_64 and i386 for Suse. Detected architecture is <${::architecture}>.")
} }
} }
} }
'Debian': {
$default_packages = [ 'openssh-server',
'openssh-client']
$default_sshd_config_subsystem_sftp = '/usr/lib/openssh/sftp-server'
$service_name = 'ssh'
}
default: { default: {
fail("ssh supports osfamilies RedHat and Suse. Detected osfamily is <${::osfamily}>.") fail("ssh supports osfamilies RedHat, Suse and Debian/Ubuntu. Detected osfamily is <${::osfamily}>.")
} }
} }