Debian Codegraph @

ansible_collections/community/general/tests/integration/targets/yarn/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 # Yarn package manager integration tests
8 # Copyright (c) 2018 David Gunter, <[email protected]>
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
14 - include_tasks: run_alpine.yml
15 when: ansible_facts.os_family == 'Alpine'
16
17 - include_tasks: run.yml
18 vars:
19 nodejs_version: '{{ item.node_version }}'
20 nodejs_path: 'node-v{{ nodejs_version }}-{{ ansible_facts.system|lower }}-{{ nodejs_arch }}'
21 nodejs_arch: '{{ "x64" if ansible_architecture == "x86_64" else "arm64" if ansible_architecture in ("arm64", "aarch64") else ansible_architecture }}'
22 nodejs_ext: '{{ ".tar.xz" if ansible_system == "Linux" else ".tar.gz" }}'
23 nodejs_download: 'https://nodejs.org/dist/v{{ nodejs_version }}/{{ nodejs_path }}{{ nodejs_ext }}'
24 yarn_version: '{{ item.yarn_version }}'
25 with_items:
26 - {node_version: 16.20.2, yarn_version: 1.22.22} # oldest node version with macOS arm64 support
27 when:
28 - not (ansible_facts.os_family == 'Alpine')