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.
|
This module has been tested to work on the following systems with Puppet v3.
|
||||||
|
|
||||||
|
* Debian 7
|
||||||
* EL 5
|
* EL 5
|
||||||
* EL 6
|
* EL 6
|
||||||
* SLES 11
|
* SLES 11
|
||||||
|
@ -116,17 +116,10 @@ class ssh (
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
'Debian': {
|
'Debian': {
|
||||||
case $::operatingsystem {
|
$default_packages = [ 'openssh-server',
|
||||||
'Ubuntu': {
|
'openssh-client']
|
||||||
$default_packages = [ 'openssh-server',
|
$default_sshd_config_subsystem_sftp = '/usr/lib/openssh/sftp-server'
|
||||||
'openssh-client']
|
$default_service_name = 'ssh'
|
||||||
$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: {
|
default: {
|
||||||
fail("ssh supports osfamilies RedHat, Suse and Debian. Detected osfamily is <${::osfamily}>.")
|
fail("ssh supports osfamilies RedHat, Suse and Debian. Detected osfamily is <${::osfamily}>.")
|
||||||
|
@ -82,29 +82,11 @@ describe 'ssh' do
|
|||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'with default params on osfamily Debian operatingsystem Debian' do
|
context 'with default params on osfamily Debian' do
|
||||||
let :facts do
|
let :facts do
|
||||||
{
|
{
|
||||||
:fqdn => 'monkey.example.com',
|
:fqdn => 'monkey.example.com',
|
||||||
:osfamily => 'Debian',
|
: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=='
|
:sshrsakey => 'AAAAB3NzaC1yc2EAAAABIwAAAQEArGElx46pD6NNnlxVaTbp0ZJMgBKCmbTCT3RaeCk0ZUJtQ8wkcwTtqIXmmiuFsynUT0DFSd8UIodnBOPqitimmooAVAiAi30TtJVzADfPScMiUnBJKZajIBkEMkwUcqsfh630jyBvLPE/kyQcxbEeGtbu1DG3monkeymanOBW1AKc5o+cJLXcInLnbowMG7NXzujT3BRYn/9s5vtT1V9cuZJs4XLRXQ50NluxJI7sVfRPVvQI9EMbTS4AFBXUej3yfgaLSV+nPZC/lmJ2gR4t/tKvMFF9m16f8IcZKK7o0rK7v81G/tREbOT5YhcKLK+0wBfR6RsmHzwy4EddZloyLQ=='
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
@ -345,7 +327,27 @@ describe 'ssh' do
|
|||||||
}
|
}
|
||||||
end
|
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
|
let :facts do
|
||||||
{
|
{
|
||||||
:fqdn => 'monkey.example.com',
|
:fqdn => 'monkey.example.com',
|
||||||
@ -381,7 +383,7 @@ describe 'ssh' do
|
|||||||
it { should contain_file('ssh_config').with_content(/^ SendEnv XMODIFIERS$/) }
|
it { should contain_file('ssh_config').with_content(/^ SendEnv XMODIFIERS$/) }
|
||||||
end
|
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
|
let :facts do
|
||||||
{
|
{
|
||||||
:fqdn => 'monkey.example.com',
|
:fqdn => 'monkey.example.com',
|
||||||
@ -608,7 +610,7 @@ describe 'ssh' do
|
|||||||
end
|
end
|
||||||
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
|
let :facts do
|
||||||
{
|
{
|
||||||
:fqdn => 'monkey.example.com',
|
:fqdn => 'monkey.example.com',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user