Merge pull request #454 from francis826/redhat_operatingsystemmajrelease

Fix to detect the major release version for redhat/centos 7
This commit is contained in:
Matthew Haughton 2014-09-21 12:03:10 -04:00
commit f4ef3103a6

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