Replace `arm64` for `aarch64` in `::apt::source`
authorMatthias Pigulla <mp@webfactory.de>
Sun, 9 Jan 2022 22:33:03 +0000 (23:33 +0100)
committerGitHub <noreply@github.com>
Sun, 9 Jan 2022 22:33:03 +0000 (23:33 +0100)
manifests/source.pp

index 4e14d8a0a53d95afb9cac6d300d1119904809a08..be5b1c475253758aa1bd9799dd53df7b3e8fabf2 100644 (file)
@@ -125,11 +125,17 @@ define apt::source(
 
   $header = epp('apt/_header.epp')
 
+  if $architecture {
+    $_architecture = regsubst($architecture, '\baarch64\b', 'arm64')
+  } else {
+    $_architecture = undef
+  }
+
   $sourcelist = epp('apt/source.list.epp', {
     'comment'          => $comment,
     'includes'         => $includes,
     'options'          => delete_undef_values({
-      'arch'      => $architecture,
+      'arch'      => $_architecture,
       'trusted'   => $allow_unsigned ? {true => "yes", false => undef},
       'signed-by' => $keyring,
     }),