Skip to content

Commit

Permalink
fix handling for arm64 vs aarch64 on debian/apt repositories
Browse files Browse the repository at this point in the history
  • Loading branch information
bk-lg committed Nov 18, 2024
1 parent 071c48d commit 4a5af5c
Showing 1 changed file with 49 additions and 17 deletions.
66 changes: 49 additions & 17 deletions manifests/package/debian.pp
Original file line number Diff line number Diff line change
Expand Up @@ -28,37 +28,69 @@
undef => "https://nginx.org/packages/${distro}",
default => $repo_source,
}
apt::source { 'nginx':
location => $stable_repo_source,
repos => 'nginx',
key => { 'id' => '573BFD6B3D8FBC641079A6ABABF5BD827BD9BF62' },
release => $release,
architecture => $facts['os']['architecture'],
if $facts['os']['architecture'] == 'aarch64' {
apt::source { 'nginx':
location => $stable_repo_source,
repos => 'nginx',
key => { 'id' => '573BFD6B3D8FBC641079A6ABABF5BD827BD9BF62' },
release => $release,
architecture => 'arm64',
}
}
else {
apt::source { 'nginx':
location => $stable_repo_source,
repos => 'nginx',
key => { 'id' => '573BFD6B3D8FBC641079A6ABABF5BD827BD9BF62' },
release => $release,
architecture => $facts['os']['architecture'],
}
}
}
'nginx-mainline': {
$mainline_repo_source = $repo_source ? {
undef => "https://nginx.org/packages/mainline/${distro}",
default => $repo_source,
}
apt::source { 'nginx':
location => $mainline_repo_source,
repos => 'nginx',
key => { 'id' => '573BFD6B3D8FBC641079A6ABABF5BD827BD9BF62' },
release => $release,
architecture => $facts['os']['architecture'],
if $facts['os']['architecture'] == 'aarch64' {
apt::source { 'nginx':
location => $mainline_repo_source,
repos => 'nginx',
key => { 'id' => '573BFD6B3D8FBC641079A6ABABF5BD827BD9BF62' },
release => $release,
architecture => 'arm64',
}
}
else {
apt::source { 'nginx':
location => $mainline_repo_source,
repos => 'nginx',
key => { 'id' => '573BFD6B3D8FBC641079A6ABABF5BD827BD9BF62' },
release => $release,
architecture => $facts['os']['architecture'],
}
}
}
'passenger': {
$passenger_repo_source = $repo_source ? {
undef => 'https://oss-binaries.phusionpassenger.com/apt/passenger',
default => $repo_source,
}
apt::source { 'nginx':
location => $passenger_repo_source,
repos => 'main',
key => { 'id' => '16378A33A6EF16762922526E561F9B9CAC40B2F7' },
architecture => $facts['os']['architecture'],
if $facts['os']['architecture'] == 'aarch64' {
apt::source { 'nginx':
location => $passenger_repo_source,
repos => 'main',
key => { 'id' => '16378A33A6EF16762922526E561F9B9CAC40B2F7' },
architecture => 'arm64',
}
}
else {
apt::source { 'nginx':
location => $passenger_repo_source,
repos => 'main',
key => { 'id' => '16378A33A6EF16762922526E561F9B9CAC40B2F7' },
architecture => $facts['os']['architecture'],
}
}

package { $passenger_package_name:
Expand Down

0 comments on commit 4a5af5c

Please sign in to comment.