1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2026-03-22 05:09:12 +00:00
community.general/tests/integration/targets/npm/tasks/main.yml
patchback[bot] eae5987be1
[PR #11544/9b9d8eac backport][stable-12] Update tests to pass on macOS arm64 (#11545)
Update tests to pass on macOS arm64 (#11544)

(cherry picked from commit 9b9d8eac09)

Co-authored-by: Matt Clay <matt@mystile.com>
2026-02-27 19:29:47 +01:00

33 lines
1.4 KiB
YAML

---
####################################################################
# WARNING: These are designed specifically for Ansible tests #
# and should not be used as examples of how to write Ansible roles #
####################################################################
# test code for the npm module
# Copyright (c) Ansible Project
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
# SPDX-License-Identifier: GPL-3.0-or-later
# -------------------------------------------------------------
# Setup steps
- when:
- not (ansible_facts.os_family == 'Alpine') # TODO
block:
# expand remote path
- command: 'echo {{ remote_tmp_dir }}'
register: echo
- set_fact:
remote_dir: '{{ echo.stdout }}'
- include_tasks: run.yml
vars:
nodejs_version: '{{ item }}'
nodejs_path: 'node-v{{ nodejs_version }}-{{ ansible_facts.system|lower }}-{{ nodejs_arch }}'
nodejs_arch: '{{ "x64" if ansible_architecture == "x86_64" else "arm64" if ansible_architecture in ("arm64", "aarch64") else ansible_architecture }}'
nodejs_ext: '{{ ".tar.xz" if ansible_system == "Linux" else ".tar.gz" }}'
nodejs_download: 'https://nodejs.org/dist/v{{ nodejs_version }}/{{ nodejs_path }}{{ nodejs_ext }}'
with_items:
- 16.20.2 # oldest node version with macOS arm64 support