1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2026-06-10 18:15:39 +00:00

[PR #12201/877f20f2 backport][stable-13] replace lingering ansible_xxx with ansible_facts.xxx (#12202)

replace lingering ansible_xxx with ansible_facts.xxx (#12201)

(cherry picked from commit 877f20f278)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
This commit is contained in:
patchback[bot] 2026-06-06 11:52:58 +02:00 committed by GitHub
parent 4422066f17
commit e7f3c2cbfe
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 10 additions and 8 deletions

View file

@ -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

View file

@ -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

View file

@ -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"

View file

@ -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: