From ca421cf4871f218f992a7571a8c67bf30ef48f06 Mon Sep 17 00:00:00 2001 From: Pradeep Kilambi Date: Tue, 24 Sep 2013 17:53:05 -0400 Subject: [PATCH] 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 --- manifests/repo/rdo.pp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/manifests/repo/rdo.pp b/manifests/repo/rdo.pp index 9f172d1..9939e88 100644 --- a/manifests/repo/rdo.pp +++ b/manifests/repo/rdo.pp @@ -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')