From 236d009a4351acfefd071ad3fed39b80ddf7abc6 Mon Sep 17 00:00:00 2001 From: Josh Beard Date: Fri, 12 Jun 2015 14:10:20 -0600 Subject: [PATCH] Add support for Scientific Linux in Yum repo This commit uses the $::operatingsystemmajrelease fact for managing the Yum repository on Scientific Linux. Yum's "$releasever" resolves to "6.6" (major.minor) on Scientific Linux, where it resolves to "major" or "major(.server)?" on RedHat. That causes the repo to fail on Scientific Linux. The other solution would be to add symlinks for major.minor in the upstream Yum repo. E.g. 6.6 => 6 --- manifests/params.pp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/manifests/params.pp b/manifests/params.pp index 288e3d0..fad9bee 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -52,10 +52,20 @@ class icingaweb2::params { $pkg_list = ['icingaweb2'] $pkg_repo_release_key = 'http://packages.icinga.org/icinga.key' $pkg_repo_release_metadata_expire = undef - $pkg_repo_release_url = 'http://packages.icinga.org/epel/$releasever/release' + + case $::operatingsystem { + 'Scientific': { + $pkg_repo_release_url = "http://packages.icinga.org/epel/${::operatingsystemmajrelease}/release" + $pkg_repo_snapshot_url = "http://packages.icinga.org/epel/${::operatingsystemmajrelease}/snapshot" + } + default: { + $pkg_repo_release_url = 'http://packages.icinga.org/epel/$releasever/release' + $pkg_repo_snapshot_url = 'http://packages.icinga.org/epel/$releasever/snapshot' + } + } + $pkg_repo_snapshot_key = 'http://packages.icinga.org/icinga.key' $pkg_repo_snapshot_metadata_expire = '1d' - $pkg_repo_snapshot_url = 'http://packages.icinga.org/epel/$releasever/snapshot' $web_root = '/usr/share/icingaweb2' $pkg_deps = [