replaces shared-lsb by puppetlabs/stdlib
This commit is contained in:
parent
aee6885940
commit
78f1ff00d0
8 changed files with 39 additions and 6 deletions
|
@ -7,4 +7,4 @@ summary 'ssh daemon configuration'
|
||||||
description 'Manages sshd_config'
|
description 'Manages sshd_config'
|
||||||
project_page 'https://github.com/duritong/puppet-sshd'
|
project_page 'https://github.com/duritong/puppet-sshd'
|
||||||
|
|
||||||
#dependency 'puppetlabs/stdlib', '>= 0.1.6'
|
dependency 'puppetlabs/stdlib', '>= 2.0.0'
|
|
@ -1,3 +1,3 @@
|
||||||
forge 'http://forge.puppetlabs.com'
|
forge 'http://forge.puppetlabs.com'
|
||||||
|
|
||||||
#mod 'puppetlabs/stdlib', '>=0.1.6'
|
mod 'puppetlabs/stdlib', '>=2.0.0'
|
|
@ -1,2 +1,8 @@
|
||||||
DEPENDENCIES
|
FORGE
|
||||||
|
remote: http://forge.puppetlabs.com
|
||||||
|
specs:
|
||||||
|
puppetlabs/stdlib (4.1.0)
|
||||||
|
|
||||||
|
DEPENDENCIES
|
||||||
|
puppetlabs/stdlib (>= 2.0.0)
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,7 @@ This module requires puppet => 2.6, and the following modules are required
|
||||||
pre-dependencies:
|
pre-dependencies:
|
||||||
|
|
||||||
- shared-common: `git://labs.riseup.net/shared-common`
|
- shared-common: `git://labs.riseup.net/shared-common`
|
||||||
- shared-lsb: `git://labs.riseup.net/shared-lsb`
|
- [puppetlabs/stdlib](https://github.com/puppetlabs/puppetlabs-stdlib) >= 2.x
|
||||||
|
|
||||||
## OpenSSH Server
|
## OpenSSH Server
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
class sshd::debian inherits sshd::linux {
|
class sshd::debian inherits sshd::linux {
|
||||||
|
|
||||||
# the templates for Debian need lsbdistcodename
|
# the templates for Debian need lsbdistcodename
|
||||||
require lsb
|
ensure_resource('package', 'lsb-release', {'ensure' => 'present' })
|
||||||
|
#requires stdlib >= 3.2
|
||||||
|
#ensure_packages(['lsb-release'])
|
||||||
|
|
||||||
Package[openssh]{
|
Package[openssh]{
|
||||||
name => 'openssh-server',
|
name => 'openssh-server',
|
||||||
|
|
24
spec/classes/init_spec.rb
Normal file
24
spec/classes/init_spec.rb
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
require 'spec_helper'
|
||||||
|
|
||||||
|
describe 'sshd' do
|
||||||
|
|
||||||
|
|
||||||
|
shared_examples "a Linux OS" do
|
||||||
|
it { should compile.with_all_deps }
|
||||||
|
it { should contain_class('sshd') }
|
||||||
|
it { should contain_class('sshd::client') }
|
||||||
|
end
|
||||||
|
|
||||||
|
context "Debian OS" do
|
||||||
|
let :facts do
|
||||||
|
{
|
||||||
|
:operatingsystem => 'Debian',
|
||||||
|
:osfamily => 'Debian',
|
||||||
|
:lsbdistcodename => 'wheezy',
|
||||||
|
}
|
||||||
|
end
|
||||||
|
it_behaves_like "a Linux OS"
|
||||||
|
it { should contain_package('lsb-release') }
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
|
@ -3,7 +3,7 @@ $LOAD_PATH.unshift File.join(dir, 'lib')
|
||||||
require 'puppet'
|
require 'puppet'
|
||||||
require 'rspec'
|
require 'rspec'
|
||||||
require 'puppetlabs_spec_helper/module_spec_helper'
|
require 'puppetlabs_spec_helper/module_spec_helper'
|
||||||
require 'rspec-hiera-puppet'
|
#require 'rspec-hiera-puppet'
|
||||||
require 'rspec-puppet/coverage'
|
require 'rspec-puppet/coverage'
|
||||||
require 'rspec/autorun'
|
require 'rspec/autorun'
|
||||||
|
|
||||||
|
|
|
@ -20,5 +20,6 @@ RSpec.configure do |c|
|
||||||
puppet_install
|
puppet_install
|
||||||
# Install modules and dependencies
|
# Install modules and dependencies
|
||||||
puppet_module_install(:source => proj_root, :module_name => 'sshd')
|
puppet_module_install(:source => proj_root, :module_name => 'sshd')
|
||||||
|
shell('puppet module install puppetlabs-stdlib')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue