|
31 | 31 | include 'apt' |
32 | 32 |
|
33 | 33 | $repo_key_name = $release ? { |
34 | | - '3.10' => 'C784DD0FD61E38B8B1F65E10DAD761554A72C1DF', |
35 | | - '3.11' => 'DE82F0BACC4DB70DBEF95CA65EC2255642304A6E', |
36 | | - '3.12' => '8B7C364430B66F0B084C0B0C55339A4C6A7BD8D4', |
37 | | - '3.13' => '9B5AE8E6FD2581F293104ACC38675E5F30F779AF', |
38 | | - '4.0' => '55F839E173AC06F364120D46FA86EEACB306CEE1', |
39 | | - '4.1' => 'EED3351AFD72E5437C050F0388F6CDEE78FA6D97', |
40 | | - '^5\.(\d)+$' => 'F9C958A3AEE0D2184FAD1CBD43607F0DC2F8238C', |
41 | | - default => '849512C2CA648EF425048F55C883F50CB2289A17', |
| 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 | 42 | } |
43 | 43 |
|
44 | 44 | $repo_key_source = "https://download.gluster.org/pub/gluster/glusterfs/${release}/rsa.pub" |
|
64 | 64 | 'arm64' => 'arm64', |
65 | 65 | default => false, |
66 | 66 | } |
67 | | - if versioncmp($release, '3.12') < 0 { |
68 | | - $repo_url = "https://download.gluster.org/pub/gluster/glusterfs/${release}/LATEST/Debian/${::lsbdistcodename}/apt/" |
| 67 | + |
| 68 | + $_repo_base = 'https://download.gluster.org/pub/gluster/glusterfs' |
| 69 | + $repo_url = if versioncmp($release, '4.1') < 0 { |
| 70 | + "${_repo_base}/01.old-releases/${release}/LATEST/Debian/${::lsbdistcodename}/${arch}/apt/" |
69 | 71 | } else { |
70 | | - $repo_url = "https://download.gluster.org/pub/gluster/glusterfs/${release}/LATEST/Debian/${::lsbdistcodename}/${arch}/apt/" |
| 72 | + $_release = if $release == '4.1' { |
| 73 | + $release |
| 74 | + } else { |
| 75 | + $release[0] |
| 76 | + } |
| 77 | + "${_repo_base}/${_release}/LATEST/Debian/${::lsbdistcodename}/${arch}/apt/" |
71 | 78 | } |
72 | 79 | } |
| 80 | + default: { |
| 81 | + fail('unsupported distribution codename') |
| 82 | + } |
73 | 83 | } |
74 | 84 | } |
75 | 85 | default: { |
76 | 86 | fail('gluster::repo::apt currently only works on Debian') |
77 | 87 | } |
78 | 88 | } |
79 | | - if ! $arch { |
| 89 | + |
| 90 | + unless $arch { |
80 | 91 | fail("Architecture ${::architecture} not yet supported for ${::operatingsystem}.") |
81 | 92 | } |
82 | 93 |
|
|
0 commit comments