Skip to content

Commit

Permalink
Set dependency for package under RedHat family
Browse files Browse the repository at this point in the history
  • Loading branch information
jskarpe committed Sep 29, 2016
1 parent 14f216f commit 740202b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions manifests/install.pp
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,16 @@
}

if $manage_package {
if !defined(Yum::Install['epel-release']) {
if $::osfamily == 'RedHat' {
if $::osfamily == 'RedHat' {
if !defined(Yum::Install['epel-release']) {
yum::install { 'epel-release':
ensure => 'present',
source => "https://dl.fedoraproject.org/pub/epel/epel-release-latest-${::operatingsystemmajrelease}.noarch.rpm",
}
}
Package[$package_name] {
require => Yum::Install['epel-release']
}
}

package { $package_name:
Expand Down

0 comments on commit 740202b

Please sign in to comment.