Merge pull request #454 from francis826/redhat_operatingsystemmajrelease
Fix to detect the major release version for redhat/centos 7
This commit is contained in:
commit
f4ef3103a6
1 changed files with 9 additions and 2 deletions
|
@ -19,6 +19,13 @@ class nginx::package::redhat (
|
||||||
$package_name = 'nginx',
|
$package_name = 'nginx',
|
||||||
) {
|
) {
|
||||||
|
|
||||||
|
if $::lsbmajdistrelease {
|
||||||
|
$major_dist_release = $::lsbmajdistrelease
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$major_dist_release = $::operatingsystemmajrelease
|
||||||
|
}
|
||||||
|
|
||||||
case $::operatingsystem {
|
case $::operatingsystem {
|
||||||
'fedora': {
|
'fedora': {
|
||||||
# nginx.org does not supply RPMs for fedora
|
# nginx.org does not supply RPMs for fedora
|
||||||
|
@ -31,9 +38,9 @@ class nginx::package::redhat (
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
default: {
|
default: {
|
||||||
case $::lsbmajdistrelease {
|
case $major_dist_release {
|
||||||
5, 6, 7: {
|
5, 6, 7: {
|
||||||
$os_rel = $::lsbmajdistrelease
|
$os_rel = $major_dist_release
|
||||||
}
|
}
|
||||||
default: {
|
default: {
|
||||||
# Amazon uses the year as the $::lsbmajdistrelease
|
# Amazon uses the year as the $::lsbmajdistrelease
|
||||||
|
|
Loading…
Reference in a new issue