Debian Codegraph @

ansible_collections/community/general/tests/integration/targets/npm/tasks/main.yml

raw
1 ---
2 ####################################################################
3 # WARNING: These are designed specifically for Ansible tests #
4 # and should not be used as examples of how to write Ansible roles #
5 ####################################################################
6
7 # test code for the npm module
8 # Copyright (c) Ansible Project
9 # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
10 # SPDX-License-Identifier: GPL-3.0-or-later
11
12 # -------------------------------------------------------------
13 # Setup steps
14
15 - when:
16 - not (ansible_facts.os_family == 'Alpine') # TODO
17 block:
18
19 # expand remote path
20 - command: 'echo {{ remote_tmp_dir }}'
21 register: echo
22 - set_fact:
23 remote_dir: '{{ echo.stdout }}'
24
25 - include_tasks: run.yml
26 vars:
27 nodejs_version: '{{ item }}'
28 nodejs_path: 'node-v{{ nodejs_version }}-{{ ansible_facts.system|lower }}-{{ nodejs_arch }}'
29 nodejs_arch: '{{ "x64" if ansible_architecture == "x86_64" else "arm64" if ansible_architecture in ("arm64", "aarch64") else ansible_architecture }}'
30 nodejs_ext: '{{ ".tar.xz" if ansible_system == "Linux" else ".tar.gz" }}'
31 nodejs_download: 'https://nodejs.org/dist/v{{ nodejs_version }}/{{ nodejs_path }}{{ nodejs_ext }}'
32 with_items:
33 - 16.20.2 # oldest node version with macOS arm64 support