Fix to detect the major release version for redhat/centos 7

This commit is contained in:
Luke Francis 2014-09-20 22:38:29 -07:00
parent d11d574e8c
commit 230857f874

View file

@ -19,6 +19,13 @@ class nginx::package::redhat (
$package_name = 'nginx',
) {
if $::lsbmajdistrelease {
$major_dist_release = $::lsbmajdistrelease
}
else {
$major_dist_release = $::operatingsystemmajrelease
}
case $::operatingsystem {
'fedora': {
# nginx.org does not supply RPMs for fedora
@ -31,9 +38,9 @@ class nginx::package::redhat (
}
}
default: {
case $::lsbmajdistrelease {
case $major_dist_release {
5, 6, 7: {
$os_rel = $::lsbmajdistrelease
$os_rel = $major_dist_release
}
default: {
# Amazon uses the year as the $::lsbmajdistrelease