Skip to content

Commit

Permalink
Merge pull request voxpupuli#9 from ekini/master
Browse files Browse the repository at this point in the history
Fixed package prefix for CentOS 5
  • Loading branch information
vholer committed May 30, 2016
2 parents c54d3c4 + 59cd4d4 commit 55ffce1
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions manifests/plugin.pp
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,21 @@
#
define yum::plugin (
$ensure = present,
$pkg_prefix = 'yum-plugin',
$pkg_prefix = undef,
$pkg_name = ''
) {

if $pkg_prefix {
$_pkg_prefix = $pkg_prefix
} else {
$_pkg_prefix = "${::operatingsystem}${::operatingsystemmajrelease}" ? {
'CentOS5' => 'yum',
default => 'yum-plugin'
}
}
$_pkg_name = $pkg_name ? {
'' => "${pkg_prefix}-${name}",
default => "${pkg_prefix}-${pkg_name}"
'' => "${_pkg_prefix}-${name}",
default => "${_pkg_prefix}-${pkg_name}"
}

package { $_pkg_name:
Expand Down

0 comments on commit 55ffce1

Please sign in to comment.