Skip to content

Commit

Permalink
Merge pull request voxpupuli#1212 from bastelfreak/purgerepo
Browse files Browse the repository at this point in the history
allow people to not purge passenger yumrepo
  • Loading branch information
bastelfreak authored May 11, 2018
2 parents a96953b + 770f8ac commit 7918ecc
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
1 change: 1 addition & 0 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@
$nginx_upstreams = {},
$nginx_servers = {},
$nginx_servers_defaults = {},
Boolean $purge_passenger_repo = true,
### END Hiera Lookups ###
) inherits nginx::params {

Expand Down
19 changes: 11 additions & 8 deletions manifests/package/redhat.pp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
$package_flavor = $nginx::package_flavor
$passenger_package_ensure = $nginx::passenger_package_ensure
$manage_repo = $nginx::manage_repo
$purge_passenger_repo = $nginx::purge_passenger_repo

#Install the CentOS-specific packages on that OS, otherwise assume it's a RHEL
#clone and provide the Red Hat-specific package. This comes into play when not
Expand All @@ -43,11 +44,12 @@
before => Package['nginx'],
}

yumrepo { 'passenger':
ensure => absent,
before => Package['nginx'],
if $purge_passenger_repo {
yumrepo { 'passenger':
ensure => absent,
before => Package['nginx'],
}
}

}
'nginx-mainline': {
yumrepo { 'nginx-release':
Expand All @@ -60,11 +62,12 @@
before => Package['nginx'],
}

yumrepo { 'passenger':
ensure => absent,
before => Package['nginx'],
if $purge_passenger_repo {
yumrepo { 'passenger':
ensure => absent,
before => Package['nginx'],
}
}

}
'passenger': {
if ($facts['os']['name'] in ['RedHat', 'CentOS']) and ($facts['os']['release']['major'] in ['6', '7']) {
Expand Down

0 comments on commit 7918ecc

Please sign in to comment.