Support Puppet v3.4
This commit is contained in:
parent
a2484ab239
commit
cd5e300fa0
@ -8,10 +8,6 @@ rvm:
|
||||
- 1.8.7
|
||||
- 1.9.3
|
||||
- 2.0.0
|
||||
matrix:
|
||||
fast_finish: true
|
||||
allow_failures:
|
||||
- env: PUPPET_VERSION=3.4.2
|
||||
language: ruby
|
||||
before_script: "gem install --no-ri --no-rdoc bundler"
|
||||
script: 'bundle exec rake validate && bundle exec rake lint && SPEC_OPTS="--format documentation" bundle exec rake spec'
|
||||
|
@ -8,7 +8,7 @@ The module uses exported resources to manage ssh keys and removes ssh keys that
|
||||
|
||||
# Compatability #
|
||||
|
||||
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 and Ruby versions 1.8.7, 1.9.3 and 2.0.0.
|
||||
|
||||
* Debian 7
|
||||
* EL 5
|
||||
|
@ -173,9 +173,8 @@ class ssh (
|
||||
$sshd_config_subsystem_sftp_real = $sshd_config_subsystem_sftp
|
||||
}
|
||||
|
||||
package { 'ssh_packages':
|
||||
package { $packages_real:
|
||||
ensure => installed,
|
||||
name => $packages_real,
|
||||
}
|
||||
|
||||
file { 'ssh_config' :
|
||||
@ -185,7 +184,7 @@ class ssh (
|
||||
group => $ssh_config_group,
|
||||
mode => $ssh_config_mode,
|
||||
content => template('ssh/ssh_config.erb'),
|
||||
require => Package['ssh_packages'],
|
||||
require => Package[$packages_real],
|
||||
}
|
||||
|
||||
file { 'sshd_config' :
|
||||
@ -195,7 +194,7 @@ class ssh (
|
||||
owner => $sshd_config_owner,
|
||||
group => $sshd_config_group,
|
||||
content => template('ssh/sshd_config.erb'),
|
||||
require => Package['ssh_packages'],
|
||||
require => Package[$packages_real],
|
||||
}
|
||||
|
||||
if $sshd_config_banner != 'none' and $sshd_banner_content != undef {
|
||||
@ -206,7 +205,7 @@ class ssh (
|
||||
group => $sshd_banner_group,
|
||||
mode => $sshd_banner_mode,
|
||||
content => $sshd_banner_content,
|
||||
require => Package['ssh_packages'],
|
||||
require => Package[$packages_real],
|
||||
}
|
||||
}
|
||||
|
||||
@ -265,7 +264,7 @@ class ssh (
|
||||
ensure => $ssh_key_ensure,
|
||||
type => $ssh_key_type,
|
||||
key => $key,
|
||||
require => Package['ssh_packages'],
|
||||
require => Package[$packages_real],
|
||||
}
|
||||
|
||||
# import all nodes' ssh keys
|
||||
|
@ -16,12 +16,13 @@ describe 'ssh' do
|
||||
|
||||
it { should_not contain_class('common')}
|
||||
|
||||
it {
|
||||
should contain_package('ssh_packages').with({
|
||||
'ensure' => 'installed',
|
||||
'name' => ['openssh-server','openssh-clients'],
|
||||
})
|
||||
}
|
||||
['openssh-server','openssh-clients'].each do |pkg|
|
||||
it {
|
||||
should contain_package(pkg).with({
|
||||
'ensure' => 'installed',
|
||||
})
|
||||
}
|
||||
end
|
||||
|
||||
it {
|
||||
should contain_file('ssh_config').with({
|
||||
@ -30,7 +31,7 @@ describe 'ssh' do
|
||||
'owner' => 'root',
|
||||
'group' => 'root',
|
||||
'mode' => '0644',
|
||||
'require' => 'Package[ssh_packages]',
|
||||
'require' => ['Package[openssh-server]', 'Package[openssh-clients]'],
|
||||
})
|
||||
}
|
||||
|
||||
@ -49,7 +50,7 @@ describe 'ssh' do
|
||||
'owner' => 'root',
|
||||
'group' => 'root',
|
||||
'mode' => '0600',
|
||||
'require' => 'Package[ssh_packages]',
|
||||
'require' => ['Package[openssh-server]', 'Package[openssh-clients]'],
|
||||
})
|
||||
}
|
||||
|
||||
@ -101,12 +102,13 @@ describe 'ssh' do
|
||||
|
||||
it { should_not contain_class('common')}
|
||||
|
||||
it {
|
||||
should contain_package('ssh_packages').with({
|
||||
'ensure' => 'installed',
|
||||
'name' => ['openssh-server','openssh-client'],
|
||||
})
|
||||
}
|
||||
['openssh-server','openssh-client'].each do |pkg|
|
||||
it {
|
||||
should contain_package(pkg).with({
|
||||
'ensure' => 'installed',
|
||||
})
|
||||
}
|
||||
end
|
||||
|
||||
it {
|
||||
should contain_file('ssh_config').with({
|
||||
@ -115,7 +117,7 @@ describe 'ssh' do
|
||||
'owner' => 'root',
|
||||
'group' => 'root',
|
||||
'mode' => '0644',
|
||||
'require' => 'Package[ssh_packages]',
|
||||
'require' => ['Package[openssh-server]', 'Package[openssh-client]'],
|
||||
})
|
||||
}
|
||||
|
||||
@ -134,7 +136,7 @@ describe 'ssh' do
|
||||
'owner' => 'root',
|
||||
'group' => 'root',
|
||||
'mode' => '0600',
|
||||
'require' => 'Package[ssh_packages]',
|
||||
'require' => ['Package[openssh-server]', 'Package[openssh-client]'],
|
||||
})
|
||||
}
|
||||
|
||||
@ -189,9 +191,8 @@ describe 'ssh' do
|
||||
it { should_not contain_class('common')}
|
||||
|
||||
it {
|
||||
should contain_package('ssh_packages').with({
|
||||
should contain_package('openssh').with({
|
||||
'ensure' => 'installed',
|
||||
'name' => 'openssh',
|
||||
})
|
||||
}
|
||||
|
||||
@ -202,7 +203,7 @@ describe 'ssh' do
|
||||
'owner' => 'root',
|
||||
'group' => 'root',
|
||||
'mode' => '0644',
|
||||
'require' => 'Package[ssh_packages]',
|
||||
'require' => 'Package[openssh]',
|
||||
})
|
||||
}
|
||||
|
||||
@ -221,7 +222,7 @@ describe 'ssh' do
|
||||
'owner' => 'root',
|
||||
'group' => 'root',
|
||||
'mode' => '0600',
|
||||
'require' => 'Package[ssh_packages]',
|
||||
'require' => 'Package[openssh]',
|
||||
})
|
||||
}
|
||||
|
||||
@ -276,9 +277,8 @@ describe 'ssh' do
|
||||
it { should_not contain_class('common')}
|
||||
|
||||
it {
|
||||
should contain_package('ssh_packages').with({
|
||||
should contain_package('openssh').with({
|
||||
'ensure' => 'installed',
|
||||
'name' => 'openssh',
|
||||
})
|
||||
}
|
||||
|
||||
@ -289,7 +289,7 @@ describe 'ssh' do
|
||||
'owner' => 'root',
|
||||
'group' => 'root',
|
||||
'mode' => '0644',
|
||||
'require' => 'Package[ssh_packages]',
|
||||
'require' => 'Package[openssh]',
|
||||
})
|
||||
}
|
||||
|
||||
@ -308,7 +308,7 @@ describe 'ssh' do
|
||||
'owner' => 'root',
|
||||
'group' => 'root',
|
||||
'mode' => '0600',
|
||||
'require' => 'Package[ssh_packages]',
|
||||
'require' => 'Package[openssh]',
|
||||
})
|
||||
}
|
||||
|
||||
@ -393,7 +393,7 @@ describe 'ssh' do
|
||||
'owner' => 'root',
|
||||
'group' => 'root',
|
||||
'mode' => '0644',
|
||||
'require' => 'Package[ssh_packages]',
|
||||
'require' => ['Package[openssh-server]', 'Package[openssh-clients]'],
|
||||
})
|
||||
}
|
||||
|
||||
@ -444,7 +444,7 @@ describe 'ssh' do
|
||||
'owner' => 'root',
|
||||
'group' => 'root',
|
||||
'mode' => '0600',
|
||||
'require' => 'Package[ssh_packages]',
|
||||
'require' => ['Package[openssh-server]', 'Package[openssh-clients]'],
|
||||
})
|
||||
}
|
||||
|
||||
@ -472,7 +472,7 @@ describe 'ssh' do
|
||||
'group' => 'root',
|
||||
'mode' => '0644',
|
||||
'content' => 'textinbanner',
|
||||
'require' => 'Package[ssh_packages]',
|
||||
'require' => ['Package[openssh-server]', 'Package[openssh-clients]'],
|
||||
})
|
||||
}
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user