support platforms that don't supply lsbmajdistrelease fact
This commit is contained in:
parent
f2a14b9961
commit
b9afd221a3
1 changed files with 7 additions and 1 deletions
|
@ -22,8 +22,14 @@ class nginx::package::redhat {
|
|||
$os_type = downcase($::operatingsystem)
|
||||
}
|
||||
|
||||
if $::lsbmajdistrelease == undef {
|
||||
$os_rel = regsubst($::operatingsystemrelease, '\..*$', '')
|
||||
} else {
|
||||
$os_rel = $::lsbmajdistrelease
|
||||
}
|
||||
|
||||
yumrepo { "nginx-release":
|
||||
baseurl => "http://nginx.org/packages/${os_type}/${::lsbmajdistrelease}/\$basearch/",
|
||||
baseurl => "http://nginx.org/packages/${os_type}/${os_rel}/\$basearch/",
|
||||
descr => 'nginx repo',
|
||||
enabled => '1',
|
||||
gpgcheck => '0',
|
||||
|
|
Loading…
Reference in a new issue