diff --git a/manifests/plugin.pp b/manifests/plugin.pp index e48f9a54..92abd7d9 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -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: