Skip to content

Commit c3586e3

Browse files
committed
move Debian param validation to its own code block
1 parent 793c683 commit c3586e3

File tree

1 file changed

+24
-24
lines changed

1 file changed

+24
-24
lines changed

manifests/repo/apt.pp

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -30,33 +30,33 @@
3030
) {
3131
include 'apt'
3232

33-
$repo_key_name = $release ? {
34-
'3.9' => '849512C2CA648EF425048F55C883F50CB2289A17',
35-
'3.10' => 'C784DD0FD61E38B8B1F65E10DAD761554A72C1DF',
36-
'3.11' => 'DE82F0BACC4DB70DBEF95CA65EC2255642304A6E',
37-
'3.12' => '8B7C364430B66F0B084C0B0C55339A4C6A7BD8D4',
38-
'3.13' => '9B5AE8E6FD2581F293104ACC38675E5F30F779AF',
39-
'4.0' => '55F839E173AC06F364120D46FA86EEACB306CEE1',
40-
'4.1' => 'EED3351AFD72E5437C050F0388F6CDEE78FA6D97',
41-
default => 'F9C958A3AEE0D2184FAD1CBD43607F0DC2F8238C',
42-
}
43-
44-
$repo_key_source = "https://download.gluster.org/pub/gluster/glusterfs/${release}/rsa.pub"
45-
46-
# basic sanity check
47-
if $version == 'LATEST' {
48-
$repo_ver = $version
49-
} elsif $version =~ /^\d\.\d+$/ {
50-
$repo_ver = "${version}/LATEST"
51-
} elsif $version =~ /^(\d)\.(\d+)\.(\d+).*$/ {
52-
$repo_ver = "${1}.${2}/${1}.${2}.${3}"
53-
} else {
54-
fail("${version} doesn't make sense for ${facts['os']['name']}!")
55-
}
56-
5733
# the Gluster repo only supports x86_64 (amd64) and arm64. The Ubuntu PPA also supports armhf and arm64.
5834
case $facts['os']['name'] {
5935
'Debian': {
36+
$repo_key_name = $release ? {
37+
'3.9' => '849512C2CA648EF425048F55C883F50CB2289A17',
38+
'3.10' => 'C784DD0FD61E38B8B1F65E10DAD761554A72C1DF',
39+
'3.11' => 'DE82F0BACC4DB70DBEF95CA65EC2255642304A6E',
40+
'3.12' => '8B7C364430B66F0B084C0B0C55339A4C6A7BD8D4',
41+
'3.13' => '9B5AE8E6FD2581F293104ACC38675E5F30F779AF',
42+
'4.0' => '55F839E173AC06F364120D46FA86EEACB306CEE1',
43+
'4.1' => 'EED3351AFD72E5437C050F0388F6CDEE78FA6D97',
44+
default => 'F9C958A3AEE0D2184FAD1CBD43607F0DC2F8238C',
45+
}
46+
47+
$repo_key_source = "https://download.gluster.org/pub/gluster/glusterfs/${release}/rsa.pub"
48+
49+
# basic sanity check
50+
if $version == 'LATEST' {
51+
$repo_ver = $version
52+
} elsif $version =~ /^\d\.\d+$/ {
53+
$repo_ver = "${version}/LATEST"
54+
} elsif $version =~ /^(\d)\.(\d+)\.(\d+).*$/ {
55+
$repo_ver = "${1}.${2}/${1}.${2}.${3}"
56+
} else {
57+
fail("${version} doesn't make sense for ${facts['os']['name']}!")
58+
}
59+
6060
case $facts['os']['distro']['codename'] {
6161
'jessie', 'stretch': {
6262
$arch = $facts['os']['architecture'] ? {

0 commit comments

Comments
 (0)