|
62 | 62 | Enum['http', 'https'] $source_protocol = 'https', |
63 | 63 | Boolean $local = false, |
64 | 64 | Optional[Stdlib::Fqdn] $domain = undef, |
| 65 | + Optional[Array] $extra_arch = ['armhf'], |
65 | 66 | Optional[Eit_types::Date] $snapshot = undef, |
66 | 67 | ) { |
67 | 68 | File { |
|
72 | 73 | } |
73 | 74 |
|
74 | 75 | # Get the architecture |
75 | | - $architecture = $facts['os']['architecture'] ? { |
| 76 | + $fact_arch = $facts['os']['architecture'] ? { |
76 | 77 | 'aarch64' => 'arm64', |
77 | 78 | default => 'amd64', |
78 | 79 | } |
79 | 80 |
|
| 81 | + # Final architecture list |
| 82 | + $architecture = $extra_arch.empty ? { |
| 83 | + true => [$fact_arch], |
| 84 | + false => unique([$fact_arch] + $extra_arch), |
| 85 | + } |
| 86 | + |
80 | 87 | if $manage { |
81 | 88 | class { 'eit_repos': |
82 | 89 | purge => $purge, |
|
156 | 163 | } |
157 | 164 | } |
158 | 165 | 'Debian': { |
| 166 | + $arch = $facts['os']['architecture'] ? { |
| 167 | + 'aarch64' => 'arm64', |
| 168 | + default => 'amd64', |
| 169 | + } |
159 | 170 | $aptrepos.each |$key, $value| { |
160 | 171 | apt::source { $key: |
161 | 172 | ensure => present, |
162 | 173 | noop => $noop_value, |
163 | | - architecture => $architecture, |
| 174 | + architecture => $arch, |
164 | 175 | release => $_os_codename, |
165 | 176 | comment => "${key} repo server", |
166 | 177 | location => $value['url'].inline_epp({ snapshot => $snapshot, }), |
|
281 | 292 | apt::source { "local_apt_repo_${_os_codename}-${repo}": |
282 | 293 | ensure => present, |
283 | 294 | noop => $noop_value, |
284 | | - architecture => $architecture, |
| 295 | + architecture => $architecture.join(','), |
285 | 296 | release => "${_os_codename}-${repo}", |
286 | 297 | comment => "local apt ${_os_codename}-${repo} server", |
287 | 298 | location => "https://${domain}/${_snapshot_uri_fragment}apt/${apt_repo}", |
|
296 | 307 | apt::source { "local_apt_repo_${_os_codename}": |
297 | 308 | ensure => present, |
298 | 309 | noop => $noop_value, |
299 | | - architecture => $architecture, |
| 310 | + architecture => $architecture.join(','), |
300 | 311 | release => $_os_codename, |
301 | 312 | comment => 'local apt repo server', |
302 | 313 | location => "https://${domain}/${_snapshot_uri_fragment}apt/${apt_repo}", |
|
0 commit comments