Skip to content

Commit 8c9e72b

Browse files
author
deepakt7340
committed
Fix: Update architecture logic to support multi-arch via extra_arch
1 parent cf923d2 commit 8c9e72b

File tree

3 files changed

+15
-6
lines changed

3 files changed

+15
-6
lines changed

modules/enableit/common/manifests/repo.pp

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@
6262
Enum['http', 'https'] $source_protocol = 'https',
6363
Boolean $local = false,
6464
Optional[Stdlib::Fqdn] $domain = undef,
65+
Optional[Array] $extra_arch = ['armhf'],
6566
Optional[Eit_types::Date] $snapshot = undef,
6667
) {
6768
File {
@@ -72,11 +73,17 @@
7273
}
7374

7475
# Get the architecture
75-
$architecture = $facts['os']['architecture'] ? {
76+
$fact_arch = $facts['os']['architecture'] ? {
7677
'aarch64' => 'arm64',
7778
default => 'amd64',
7879
}
7980

81+
# Final architecture list
82+
$architecture = $extra_arch.empty ? {
83+
true => [$fact_arch],
84+
false => unique([$fact_arch] + $extra_arch),
85+
}
86+
8087
if $manage {
8188
class { 'eit_repos':
8289
purge => $purge,
@@ -156,11 +163,15 @@
156163
}
157164
}
158165
'Debian': {
166+
$arch = $facts['os']['architecture'] ? {
167+
'aarch64' => 'arm64',
168+
default => 'amd64',
169+
}
159170
$aptrepos.each |$key, $value| {
160171
apt::source { $key:
161172
ensure => present,
162173
noop => $noop_value,
163-
architecture => $architecture,
174+
architecture => $arch,
164175
release => $_os_codename,
165176
comment => "${key} repo server",
166177
location => $value['url'].inline_epp({ snapshot => $snapshot, }),
@@ -281,7 +292,7 @@
281292
apt::source { "local_apt_repo_${_os_codename}-${repo}":
282293
ensure => present,
283294
noop => $noop_value,
284-
architecture => $architecture,
295+
architecture => $architecture.join(','),
285296
release => "${_os_codename}-${repo}",
286297
comment => "local apt ${_os_codename}-${repo} server",
287298
location => "https://${domain}/${_snapshot_uri_fragment}apt/${apt_repo}",
@@ -296,7 +307,7 @@
296307
apt::source { "local_apt_repo_${_os_codename}":
297308
ensure => present,
298309
noop => $noop_value,
299-
architecture => $architecture,
310+
architecture => $architecture.join(','),
300311
release => $_os_codename,
301312
comment => 'local apt repo server',
302313
location => "https://${domain}/${_snapshot_uri_fragment}apt/${apt_repo}",

modules/enableit/eit_files/manifests/file.pp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
Optional[Stdlib::Unixpath] $target = undef,
1919
Optional[Stdlib::AbsolutePath] $ensure_mount = undef,
2020
Eit_types::Noop_Value $noop_value = undef,
21-
Optional[Boolean] $recurse = true,
2221
) {
2322

2423
if $source and $content {
@@ -38,7 +37,6 @@
3837
content => $content,
3938
target => $target,
4039
noop => $noop_value,
41-
recurse => $recurse,
4240
}
4341

4442
$_obmondo_file = if $source {
7.23 KB
Binary file not shown.

0 commit comments

Comments
 (0)