Skip to content

Commit

Permalink
Fixed package prefix for CentOS 5
Browse files Browse the repository at this point in the history
  • Loading branch information
Eugene Dementiev committed Aug 13, 2015
1 parent c54d3c4 commit 59cd4d4
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 59cd4d4

Please sign in to comment.