mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-06-10 18:15:39 +00:00
replace lingering ansible_xxx with ansible_facts.xxx (#12201)
This commit is contained in:
parent
10d77d934b
commit
877f20f278
4 changed files with 10 additions and 8 deletions
|
|
@ -9,8 +9,10 @@
|
|||
# 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
|
||||
|
||||
- debug: var=ansible_distribution
|
||||
- debug: var=ansible_distribution_version
|
||||
- debug:
|
||||
var: ansible_facts.distribution
|
||||
- debug:
|
||||
var: ansible_facts.distribution_version
|
||||
|
||||
- set_fact:
|
||||
validate_certs: false
|
||||
|
|
|
|||
|
|
@ -26,8 +26,8 @@
|
|||
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_arch: '{{ "x64" if ansible_facts.architecture == "x86_64" else "arm64" if ansible_facts.architecture in ("arm64", "aarch64") else ansible_facts.architecture }}'
|
||||
nodejs_ext: '{{ ".tar.xz" if ansible_facts.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
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
# 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
|
||||
|
||||
- name: Make sure we have the ansible_os_family and ansible_distribution_version facts
|
||||
- name: Make sure we have the os_family and distribution_version facts
|
||||
ansible.builtin.setup:
|
||||
gather_subset: distribution
|
||||
when: ansible_facts == {}
|
||||
|
|
@ -23,4 +23,4 @@
|
|||
loop_var: file
|
||||
loop:
|
||||
- "default.yml"
|
||||
- "{{ ansible_os_family | lower }}.yml"
|
||||
- "{{ ansible_facts.os_family | lower }}.yml"
|
||||
|
|
|
|||
|
|
@ -18,8 +18,8 @@
|
|||
vars:
|
||||
nodejs_version: '{{ item.node_version }}'
|
||||
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_arch: '{{ "x64" if ansible_facts.architecture == "x86_64" else "arm64" if ansible_facts.architecture in ("arm64", "aarch64") else ansible_facts.architecture }}'
|
||||
nodejs_ext: '{{ ".tar.xz" if ansible_facts.system == "Linux" else ".tar.gz" }}'
|
||||
nodejs_download: 'https://nodejs.org/dist/v{{ nodejs_version }}/{{ nodejs_path }}{{ nodejs_ext }}'
|
||||
yarn_version: '{{ item.yarn_version }}'
|
||||
with_items:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue