From 19a6d9091fafbe98cdd10090aaf39a04ea4ccbc4 Mon Sep 17 00:00:00 2001 From: Alexei Znamensky <103110+russoz@users.noreply.github.com> Date: Sat, 6 Jun 2026 17:35:34 +1200 Subject: [PATCH] replace lingering ansible_xxx with ansible_facts.xxx (#12201) (cherry picked from commit 877f20f278a35f89e41b9309387f514c8ef4e8d6) --- tests/integration/targets/ipify_facts/tasks/main.yml | 6 ++++-- tests/integration/targets/npm/tasks/main.yml | 4 ++-- tests/integration/targets/setup_os_pkg_name/tasks/main.yml | 4 ++-- tests/integration/targets/yarn/tasks/main.yml | 4 ++-- 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/tests/integration/targets/ipify_facts/tasks/main.yml b/tests/integration/targets/ipify_facts/tasks/main.yml index d445de9746..2edb833e15 100644 --- a/tests/integration/targets/ipify_facts/tasks/main.yml +++ b/tests/integration/targets/ipify_facts/tasks/main.yml @@ -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 diff --git a/tests/integration/targets/npm/tasks/main.yml b/tests/integration/targets/npm/tasks/main.yml index bf63e8fbbe..9960ca72b9 100644 --- a/tests/integration/targets/npm/tasks/main.yml +++ b/tests/integration/targets/npm/tasks/main.yml @@ -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 diff --git a/tests/integration/targets/setup_os_pkg_name/tasks/main.yml b/tests/integration/targets/setup_os_pkg_name/tasks/main.yml index 91066cf53c..76b2093eff 100644 --- a/tests/integration/targets/setup_os_pkg_name/tasks/main.yml +++ b/tests/integration/targets/setup_os_pkg_name/tasks/main.yml @@ -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" diff --git a/tests/integration/targets/yarn/tasks/main.yml b/tests/integration/targets/yarn/tasks/main.yml index 8180d375eb..c12f7e9c49 100644 --- a/tests/integration/targets/yarn/tasks/main.yml +++ b/tests/integration/targets/yarn/tasks/main.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: