Skip to content

Commit

Permalink
use operatingsystemmajrelease fact
Browse files Browse the repository at this point in the history
  • Loading branch information
mmckinst committed Dec 15, 2015
1 parent 9d3d643 commit 34a16c8
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,6 @@
'Ubuntu' => 'ubuntu',
}

$os_ver = $::operatingsystemrelease ? {
/7.[0-9]+/ => '7',
/6.[0-9]+/ => '6',
/5.[0-9]+/ => '5',
default => $::operatingsystemrelease,
}

$arch = $::architecture ? {
'i386' => 'x86',
'x86_64' => 'amd64',
Expand All @@ -68,7 +61,7 @@
yumrepo { 'MariaDB' :
ensure => $ensure,
descr => 'MariaDB',
baseurl => "http://yum.mariadb.org/${version}/${os}${os_ver}-${arch}",
baseurl => "http://yum.mariadb.org/${version}/${operatingsystemmajrelease}${os_ver}-${arch}",
gpgkey => 'https://yum.mariadb.org/RPM-GPG-KEY-MariaDB',
gpgcheck => 1,
}
Expand Down

0 comments on commit 34a16c8

Please sign in to comment.