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
This commit is contained in:
Josh Beard 2015-06-12 14:10:20 -06:00
parent 4a292671d2
commit 236d009a43

View file

@ -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 = [