Merge pull request #342 from Mayflower/suse-packages

Suse packages
This commit is contained in:
James Fryman 2014-06-20 09:41:58 -05:00
commit 74855ff1ee
3 changed files with 11 additions and 28 deletions

View file

@ -45,8 +45,9 @@ class nginx::package(
}
'suse': {
class { 'nginx::package::suse':
require => Anchor['nginx::package::begin'],
before => Anchor['nginx::package::end'],
package_name => $package_name,
require => Anchor['nginx::package::begin'],
before => Anchor['nginx::package::end'],
}
}
'archlinux': {

View file

@ -15,16 +15,15 @@
# Sample Usage:
#
# This class file is not called directly
class nginx::package::suse {
class nginx::package::suse (
$package_name = 'nginx'
) {
$suse_packages = [
'nginx-0.8', 'apache2', 'apache2-itk', 'apache2-utils', 'gd', 'libapr1',
'libapr-util1', 'libjpeg62', 'libpng14-14', 'libxslt', 'rubygem-daemon_controller',
'rubygem-fastthread', 'rubygem-file-tail', 'rubygem-passenger',
'rubygem-passenger-nginx', 'rubygem-rack', 'rubygem-rake', 'rubygem-spruz',
]
if $caller_module_name != $module_name {
warning("${name} is deprecated as a public API of the ${module_name} module and should no longer be directly included in the manifest.")
}
package { $suse_packages:
package { $package_name:
ensure => $nginx::package_ensure,
}
}

View file

@ -87,24 +87,7 @@ describe 'nginx::package' do
shared_examples 'suse' do |operatingsystem|
let(:facts) {{ :operatingsystem => operatingsystem, :osfamily => 'Suse'}}
[
'nginx-0.8',
'apache2',
'apache2-itk',
'apache2-utils',
'gd',
'libapr1',
'libapr-util1',
'libjpeg62',
'libpng14-14',
'libxslt',
'rubygem-daemon_controller',
'rubygem-fastthread',
'rubygem-file-tail',
'rubygem-passenger',
'rubygem-passenger-nginx',
'rubygem-rack',
'rubygem-rake',
'rubygem-spruz',
'nginx',
].each do |package|
it { should contain_package("#{package}") }
end