|
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, }), |
|
272 | 283 | $apt_repo = $_os_type |
273 | 284 | } |
274 | 285 |
|
| 286 | + $arch_join = $architecture.join(',') |
| 287 | + notify{"The value for archetcture is ${arch_join}":} |
| 288 | + |
275 | 289 | $feature_repo = $_os_type ? { |
276 | 290 | 'ubuntu' => ['backports', 'security', 'updates'], |
277 | 291 | 'debian' => ['backports', 'updates'], |
|
281 | 295 | apt::source { "local_apt_repo_${_os_codename}-${repo}": |
282 | 296 | ensure => present, |
283 | 297 | noop => $noop_value, |
284 | | - architecture => $architecture, |
| 298 | + architecture => $architecture.join(','), |
285 | 299 | release => "${_os_codename}-${repo}", |
286 | 300 | comment => "local apt ${_os_codename}-${repo} server", |
287 | 301 | location => "https://${domain}/${_snapshot_uri_fragment}apt/${apt_repo}", |
|
296 | 310 | apt::source { "local_apt_repo_${_os_codename}": |
297 | 311 | ensure => present, |
298 | 312 | noop => $noop_value, |
299 | | - architecture => $architecture, |
| 313 | + architecture => $architecture.join(','), |
300 | 314 | release => $_os_codename, |
301 | 315 | comment => 'local apt repo server', |
302 | 316 | location => "https://${domain}/${_snapshot_uri_fragment}apt/${apt_repo}", |
|
0 commit comments