replaces shared-lsb by puppetlabs/stdlib

This commit is contained in:
Tomas Barton 2014-01-26 09:36:35 +01:00
parent aee6885940
commit 78f1ff00d0
8 changed files with 39 additions and 6 deletions

View file

@ -7,4 +7,4 @@ summary 'ssh daemon configuration'
description 'Manages sshd_config'
project_page 'https://github.com/duritong/puppet-sshd'
#dependency 'puppetlabs/stdlib', '>= 0.1.6'
dependency 'puppetlabs/stdlib', '>= 2.0.0'

View file

@ -1,3 +1,3 @@
forge 'http://forge.puppetlabs.com'
#mod 'puppetlabs/stdlib', '>=0.1.6'
mod 'puppetlabs/stdlib', '>=2.0.0'

View file

@ -1,2 +1,8 @@
DEPENDENCIES
FORGE
remote: http://forge.puppetlabs.com
specs:
puppetlabs/stdlib (4.1.0)
DEPENDENCIES
puppetlabs/stdlib (>= 2.0.0)

View file

@ -17,7 +17,7 @@ This module requires puppet => 2.6, and the following modules are required
pre-dependencies:
- 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

View file

@ -1,7 +1,9 @@
class sshd::debian inherits sshd::linux {
# 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]{
name => 'openssh-server',

24
spec/classes/init_spec.rb Normal file
View 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

View file

@ -3,7 +3,7 @@ $LOAD_PATH.unshift File.join(dir, 'lib')
require 'puppet'
require 'rspec'
require 'puppetlabs_spec_helper/module_spec_helper'
require 'rspec-hiera-puppet'
#require 'rspec-hiera-puppet'
require 'rspec-puppet/coverage'
require 'rspec/autorun'

View file

@ -20,5 +20,6 @@ RSpec.configure do |c|
puppet_install
# Install modules and dependencies
puppet_module_install(:source => proj_root, :module_name => 'sshd')
shell('puppet module install puppetlabs-stdlib')
end
end