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:
Pradeep Kilambi
2013-09-24 17:53:05 -04:00
parent 22b7edbdc4
commit ca421cf487

View File

@@ -3,9 +3,9 @@ class openstack::repo::rdo {
include openstack::repo::epel
if $::osfamily == 'RedHat' {
$dist = $::operatingsystem ? {
/(CentOS|RedHat|Scientific|SLC)/ => 'epel',
'Fedora' => 'fedora',
case $operatingsystem {
centos, redhat, scientific, slc: { $dist = 'epel' }
fedora: { $dist = 'fedora' }
}
# $lsbmajdistrelease is only available with redhat-lsb installed
$osver = regsubst($::operatingsystemrelease, '(\d+)\..*', '\1')