Skip to content

Commit

Permalink
Simplify coding style
Browse files Browse the repository at this point in the history
  • Loading branch information
ekohl committed Nov 26, 2018
1 parent 37db704 commit 6f4c54d
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions manifests/repo/apt.pp
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@
# Copyright 2015 RL Solutions, unless otherwise noted
#
class gluster::repo::apt (
$version = $::gluster::params::version,
$release = $::gluster::params::release,
$priority = $::gluster::params::repo_priority,
$version = $::gluster::params::version,
$release = $::gluster::params::release,
$priority = $::gluster::params::repo_priority,
) {
include '::apt'

Expand All @@ -50,14 +50,12 @@
# basic sanity check
if $version == 'LATEST' {
$repo_ver = $version
} elsif $version =~ /^\d\.\d+$/ {
$repo_ver = "${version}/LATEST"
} elsif $version =~ /^(\d)\.(\d+)\.(\d+).*$/ {
$repo_ver = "${1}.${2}/${1}.${2}.${3}"
} else {
if $version =~ /^\d\.\d+$/ {
$repo_ver = "${version}/LATEST"
} elsif $version =~ /^(\d)\.(\d+)\.(\d+).*$/ {
$repo_ver = "${1}.${2}/${1}.${2}.${3}"
} else {
fail("${version} doesn't make sense for ${::operatingsystem}!")
}
fail("${version} doesn't make sense for ${::operatingsystem}!")
}

# the Gluster repo only supports x86_64 and i386. armhf is only supported for Raspbian. The Ubuntu PPA also supports armhf and arm64.
Expand Down

0 comments on commit 6f4c54d

Please sign in to comment.