Skip to content

Commit 4a5af5c

Browse files
committed
fix handling for arm64 vs aarch64 on debian/apt repositories
1 parent 071c48d commit 4a5af5c

File tree

1 file changed

+49
-17
lines changed

1 file changed

+49
-17
lines changed

manifests/package/debian.pp

+49-17
Original file line numberDiff line numberDiff line change
@@ -28,37 +28,69 @@
2828
undef => "https://nginx.org/packages/${distro}",
2929
default => $repo_source,
3030
}
31-
apt::source { 'nginx':
32-
location => $stable_repo_source,
33-
repos => 'nginx',
34-
key => { 'id' => '573BFD6B3D8FBC641079A6ABABF5BD827BD9BF62' },
35-
release => $release,
36-
architecture => $facts['os']['architecture'],
31+
if $facts['os']['architecture'] == 'aarch64' {
32+
apt::source { 'nginx':
33+
location => $stable_repo_source,
34+
repos => 'nginx',
35+
key => { 'id' => '573BFD6B3D8FBC641079A6ABABF5BD827BD9BF62' },
36+
release => $release,
37+
architecture => 'arm64',
38+
}
39+
}
40+
else {
41+
apt::source { 'nginx':
42+
location => $stable_repo_source,
43+
repos => 'nginx',
44+
key => { 'id' => '573BFD6B3D8FBC641079A6ABABF5BD827BD9BF62' },
45+
release => $release,
46+
architecture => $facts['os']['architecture'],
47+
}
3748
}
3849
}
3950
'nginx-mainline': {
4051
$mainline_repo_source = $repo_source ? {
4152
undef => "https://nginx.org/packages/mainline/${distro}",
4253
default => $repo_source,
4354
}
44-
apt::source { 'nginx':
45-
location => $mainline_repo_source,
46-
repos => 'nginx',
47-
key => { 'id' => '573BFD6B3D8FBC641079A6ABABF5BD827BD9BF62' },
48-
release => $release,
49-
architecture => $facts['os']['architecture'],
55+
if $facts['os']['architecture'] == 'aarch64' {
56+
apt::source { 'nginx':
57+
location => $mainline_repo_source,
58+
repos => 'nginx',
59+
key => { 'id' => '573BFD6B3D8FBC641079A6ABABF5BD827BD9BF62' },
60+
release => $release,
61+
architecture => 'arm64',
62+
}
63+
}
64+
else {
65+
apt::source { 'nginx':
66+
location => $mainline_repo_source,
67+
repos => 'nginx',
68+
key => { 'id' => '573BFD6B3D8FBC641079A6ABABF5BD827BD9BF62' },
69+
release => $release,
70+
architecture => $facts['os']['architecture'],
71+
}
5072
}
5173
}
5274
'passenger': {
5375
$passenger_repo_source = $repo_source ? {
5476
undef => 'https://oss-binaries.phusionpassenger.com/apt/passenger',
5577
default => $repo_source,
5678
}
57-
apt::source { 'nginx':
58-
location => $passenger_repo_source,
59-
repos => 'main',
60-
key => { 'id' => '16378A33A6EF16762922526E561F9B9CAC40B2F7' },
61-
architecture => $facts['os']['architecture'],
79+
if $facts['os']['architecture'] == 'aarch64' {
80+
apt::source { 'nginx':
81+
location => $passenger_repo_source,
82+
repos => 'main',
83+
key => { 'id' => '16378A33A6EF16762922526E561F9B9CAC40B2F7' },
84+
architecture => 'arm64',
85+
}
86+
}
87+
else {
88+
apt::source { 'nginx':
89+
location => $passenger_repo_source,
90+
repos => 'main',
91+
key => { 'id' => '16378A33A6EF16762922526E561F9B9CAC40B2F7' },
92+
architecture => $facts['os']['architecture'],
93+
}
6294
}
6395

6496
package { $passenger_package_name:

0 commit comments

Comments
 (0)