From bbc7e8429d1cadc8d806513b9179d9a5b09e3934 Mon Sep 17 00:00:00 2001 From: "Eric D. Helms" Date: Wed, 8 Apr 2020 16:39:49 -0400 Subject: [PATCH] Only install foreman-release-scl on CentOS EL 7 --- manifests/params.pp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/manifests/params.pp b/manifests/params.pp index bb3f37739..a921b1880 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -26,8 +26,6 @@ # Additional software repos $configure_epel_repo = ($::osfamily == 'RedHat' and $::operatingsystem != 'Fedora') - # Only configure extra SCL repos on EL - $configure_scl_repo = ($::osfamily == 'RedHat' and $::operatingsystem != 'Fedora') # Advanced configuration # this can be a version or nightly @@ -113,11 +111,21 @@ $passenger_ruby_package = 'tfm-rubygem-passenger-native' $plugin_prefix = 'tfm-rubygem-foreman_' } + + case $::operatingsystem { + 'CentOS': { + $configure_scl_repo = (versioncmp($facts['operatingsystemmajrelease'], '7') >= 0) + } + default: { + $configure_scl_repo = false + } + } } 'Debian': { $passenger_ruby = '/usr/bin/foreman-ruby' $passenger_ruby_package = undef $plugin_prefix = 'ruby-foreman-' + $configure_scl_repo = false } 'Linux': { case $::operatingsystem { @@ -126,6 +134,7 @@ $passenger_ruby = '/usr/bin/tfm-ruby' $passenger_ruby_package = 'tfm-rubygem-passenger-native' $plugin_prefix = 'tfm-rubygem-foreman_' + $configure_scl_repo = true } default: { fail("${::hostname}: This module does not support operatingsystem ${::operatingsystem}")