module-icingaweb2/manifests/preinstall/redhat.pp
2015-04-23 11:40:42 +02:00

45 lines
1.3 KiB
Puppet

# == Define: icingaweb2::preinstall::redhat
#
define icingaweb2::preinstall::redhat(
$pkg_repo_version,
) {
case $::operatingsystem {
'RedHat', 'CentOS', 'Scientific': {
case $pkg_repo_version {
'release': {
yumrepo { "ICINGA-${::icingaweb2::pkg_repo_version}":
baseurl => $::icingaweb2::pkg_repo_release_url,
descr => "ICINGA (${pkg_repo_version} builds for epel)",
enabled => 1,
gpgcheck => 1,
gpgkey => $::icingaweb2::pkg_repo_release_key,
metadata_expire => $::icingaweb2::pkg_repo_release_metadata_expire,
}
}
'snapshot': {
yumrepo { "ICINGA-${::icingaweb2::pkg_repo_version}":
baseurl => $::icingaweb2::pkg_repo_snapshot_url,
descr => "ICINGA (${pkg_repo_version} builds for epel)",
enabled => 1,
gpgcheck => 1,
gpgkey => $::icingaweb2::pkg_repo_snapshot_key,
metadata_expire => $::icingaweb2::pkg_repo_snapshot_metadata_expire,
}
}
default: {}
}
}
# TODO 'Amazon': {}
# TODO 'Debian': {}
# TODO 'Fedora': {}
# TODO 'Ubuntu': {}
default: {
# Already caught by icingaweb2::preinstall
}
}
}