diff options
| author | Luke Hoersten <[email protected]> | 2026-07-26 16:08:32 -0500 |
|---|---|---|
| committer | Luke Hoersten <[email protected]> | 2026-07-26 16:08:32 -0500 |
| commit | 9ee6ba2824ab46690865869da805b68d7e46b0e5 (patch) | |
| tree | 9cac52805b1fc6a2fc31d99f815e6b301762f1c6 /nodejs/defaults | |
| parent | a173d5c8f149b4dde505fd4ab5257fb4cbc6911e (diff) | |
nodejs: map kernel arch to Node's dist arch names
Node release tarballs use arm64/x64, not the kernel's aarch64/x86_64, so the
download URL 404'd on the arm64 Pis. Map the common arches and fall back to the
raw architecture value.
Diffstat (limited to 'nodejs/defaults')
| -rw-r--r-- | nodejs/defaults/main.yaml | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/nodejs/defaults/main.yaml b/nodejs/defaults/main.yaml index 9a383cd..e67f845 100644 --- a/nodejs/defaults/main.yaml +++ b/nodejs/defaults/main.yaml @@ -2,6 +2,11 @@ # https://nodejs.org/en/download/prebuilt-binaries nodejs_version: "v22.15.0" -nodejs_arch: "{{ansible_facts['architecture']}}" +# Node.js dist filenames use arm64/x64, not the kernel's aarch64/x86_64. +nodejs_arch_map: + x86_64: "x64" + aarch64: "arm64" + armv7l: "armv7l" +nodejs_arch: "{{ nodejs_arch_map[ansible_facts['architecture']] | default(ansible_facts['architecture']) }}" nodejs_dir: "node-{{nodejs_version}}-{{ansible_facts['system'] | lower}}-{{nodejs_arch}}" nodejs_src: "https://nodejs.org/dist/{{nodejs_version}}/{{nodejs_dir}}.tar.xz" |
