Add Debian 7 support
Thank you, for5min, for testing this out and verifying that the package names are the same between Debian 7 and Ubuntu 12.04 LTS.
This commit is contained in:
parent
4ccaf44add
commit
31397a0f18
@ -10,6 +10,7 @@ The module uses exported resources to manage ssh keys and removes ssh keys that
|
||||
|
||||
This module has been tested to work on the following systems with Puppet v3.
|
||||
|
||||
* Debian 7
|
||||
* EL 5
|
||||
* EL 6
|
||||
* SLES 11
|
||||
|
@ -116,18 +116,11 @@ class ssh (
|
||||
}
|
||||
}
|
||||
'Debian': {
|
||||
case $::operatingsystem {
|
||||
'Ubuntu': {
|
||||
$default_packages = [ 'openssh-server',
|
||||
'openssh-client']
|
||||
$default_sshd_config_subsystem_sftp = '/usr/lib/openssh/sftp-server'
|
||||
$default_service_name = 'ssh'
|
||||
}
|
||||
default: {
|
||||
fail("ssh supports Debian variant Ubuntu. Your osfamily is <${::osfamily}> and operatingsystem is <${::operatingsystem}>.")
|
||||
}
|
||||
}
|
||||
}
|
||||
default: {
|
||||
fail("ssh supports osfamilies RedHat, Suse and Debian. Detected osfamily is <${::osfamily}>.")
|
||||
}
|
||||
|
@ -82,29 +82,11 @@ describe 'ssh' do
|
||||
}
|
||||
end
|
||||
|
||||
context 'with default params on osfamily Debian operatingsystem Debian' do
|
||||
context 'with default params on osfamily Debian' do
|
||||
let :facts do
|
||||
{
|
||||
:fqdn => 'monkey.example.com',
|
||||
:osfamily => 'Debian',
|
||||
:operatingsystem => 'Debian',
|
||||
:sshrsakey => 'AAAAB3NzaC1yc2EAAAABIwAAAQEArGElx46pD6NNnlxVaTbp0ZJMgBKCmbTCT3RaeCk0ZUJtQ8wkcwTtqIXmmiuFsynUT0DFSd8UIodnBOPqitimmooAVAiAi30TtJVzADfPScMiUnBJKZajIBkEMkwUcqsfh630jyBvLPE/kyQcxbEeGtbu1DG3monkeymanOBW1AKc5o+cJLXcInLnbowMG7NXzujT3BRYn/9s5vtT1V9cuZJs4XLRXQ50NluxJI7sVfRPVvQI9EMbTS4AFBXUej3yfgaLSV+nPZC/lmJ2gR4t/tKvMFF9m16f8IcZKK7o0rK7v81G/tREbOT5YhcKLK+0wBfR6RsmHzwy4EddZloyLQ=='
|
||||
}
|
||||
end
|
||||
|
||||
it 'should fail' do
|
||||
expect {
|
||||
should include_class('ssh')
|
||||
}.to raise_error(Puppet::Error,/ssh supports Debian variant Ubuntu. Your osfamily is <Debian> and operatingsystem is <Debian>./)
|
||||
end
|
||||
end
|
||||
|
||||
context 'with default params on osfamily Debian operatingsystem Ubuntu' do
|
||||
let :facts do
|
||||
{
|
||||
:fqdn => 'monkey.example.com',
|
||||
:osfamily => 'Debian',
|
||||
:operatingsystem => 'Ubuntu',
|
||||
:sshrsakey => 'AAAAB3NzaC1yc2EAAAABIwAAAQEArGElx46pD6NNnlxVaTbp0ZJMgBKCmbTCT3RaeCk0ZUJtQ8wkcwTtqIXmmiuFsynUT0DFSd8UIodnBOPqitimmooAVAiAi30TtJVzADfPScMiUnBJKZajIBkEMkwUcqsfh630jyBvLPE/kyQcxbEeGtbu1DG3monkeymanOBW1AKc5o+cJLXcInLnbowMG7NXzujT3BRYn/9s5vtT1V9cuZJs4XLRXQ50NluxJI7sVfRPVvQI9EMbTS4AFBXUej3yfgaLSV+nPZC/lmJ2gR4t/tKvMFF9m16f8IcZKK7o0rK7v81G/tREbOT5YhcKLK+0wBfR6RsmHzwy4EddZloyLQ=='
|
||||
}
|
||||
end
|
||||
@ -345,7 +327,27 @@ describe 'ssh' do
|
||||
}
|
||||
end
|
||||
|
||||
context 'with optional params used in ssh_config set on osfamily RedHat' do
|
||||
context 'with default params on invalid osfamily' do
|
||||
let :facts do
|
||||
{
|
||||
:fqdn => 'monkey.example.com',
|
||||
:osfamily => 'C64',
|
||||
:root_home => '/root',
|
||||
:sshrsakey => 'AAAAB3NzaC1yc2EAAAABIwAAAQEArGElx46pD6NNnlxVaTbp0ZJMgBKCmbTCT3RaeCk0ZUJtQ8wkcwTtqIXmmiuFsynUT0DFSd8UIodnBOPqitimmooAVAiAi30TtJVzADfPScMiUnBJKZajIBkEMkwUcqsfh630jyBvLPE/kyQcxbEeGtbu1DG3monkeymanOBW1AKc5o+cJLXcInLnbowMG7NXzujT3BRYn/9s5vtT1V9cuZJs4XLRXQ50NluxJI7sVfRPVvQI9EMbTS4AFBXUej3yfgaLSV+nPZC/lmJ2gR4t/tKvMFF9m16f8IcZKK7o0rK7v81G/tREbOT5YhcKLK+0wBfR6RsmHzwy4EddZloyLQ=='
|
||||
}
|
||||
end
|
||||
let :params do
|
||||
{ :manage_root_ssh_config => 'invalid' }
|
||||
end
|
||||
|
||||
it 'should fail' do
|
||||
expect {
|
||||
should include_class('ssh')
|
||||
}.to raise_error(Puppet::Error,/ssh supports osfamilies RedHat, Suse and Debian. Detected osfamily is <C64>./)
|
||||
end
|
||||
end
|
||||
|
||||
context 'with optional params used in ssh_config set on valid osfamily' do
|
||||
let :facts do
|
||||
{
|
||||
:fqdn => 'monkey.example.com',
|
||||
@ -381,7 +383,7 @@ describe 'ssh' do
|
||||
it { should contain_file('ssh_config').with_content(/^ SendEnv XMODIFIERS$/) }
|
||||
end
|
||||
|
||||
context 'with params used in sshd_config set on osfamily RedHat' do
|
||||
context 'with params used in sshd_config set on valid osfamily' do
|
||||
let :facts do
|
||||
{
|
||||
:fqdn => 'monkey.example.com',
|
||||
@ -608,7 +610,7 @@ describe 'ssh' do
|
||||
end
|
||||
end
|
||||
|
||||
context 'with ssh_config_sendenv_xmodifiers set to stringified true' do
|
||||
context 'with ssh_config_sendenv_xmodifiers set to stringified \'true\'' do
|
||||
let :facts do
|
||||
{
|
||||
:fqdn => 'monkey.example.com',
|
||||
|
Loading…
x
Reference in New Issue
Block a user