Fix Operating system dist regex logic to behave correctly
The dist regex match doesnt quite work correctly today. Fixing the logic to use case to match the appropriate values and get the correct dist value. Change-Id: Ib7c73edd12d7e5e8feeb556a8928d708db8a482c
This commit is contained in:
@@ -3,9 +3,9 @@ class openstack::repo::rdo {
|
|||||||
include openstack::repo::epel
|
include openstack::repo::epel
|
||||||
|
|
||||||
if $::osfamily == 'RedHat' {
|
if $::osfamily == 'RedHat' {
|
||||||
$dist = $::operatingsystem ? {
|
case $operatingsystem {
|
||||||
/(CentOS|RedHat|Scientific|SLC)/ => 'epel',
|
centos, redhat, scientific, slc: { $dist = 'epel' }
|
||||||
'Fedora' => 'fedora',
|
fedora: { $dist = 'fedora' }
|
||||||
}
|
}
|
||||||
# $lsbmajdistrelease is only available with redhat-lsb installed
|
# $lsbmajdistrelease is only available with redhat-lsb installed
|
||||||
$osver = regsubst($::operatingsystemrelease, '(\d+)\..*', '\1')
|
$osver = regsubst($::operatingsystemrelease, '(\d+)\..*', '\1')
|
||||||
|
Reference in New Issue
Block a user