Skip to content

Commit

Permalink
Merge pull request #342 from Mayflower/suse-packages
Browse files Browse the repository at this point in the history
Suse packages
  • Loading branch information
James Fryman committed Jun 20, 2014
2 parents fc30d4c + dc1b4b5 commit 74855ff
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 28 deletions.
5 changes: 3 additions & 2 deletions manifests/package.pp
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,9 @@
}
'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': {
Expand Down
15 changes: 7 additions & 8 deletions manifests/package/suse.pp
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}
}
19 changes: 1 addition & 18 deletions spec/classes/package_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -87,24 +87,7 @@
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
Expand Down

0 comments on commit 74855ff

Please sign in to comment.