1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2026-03-22 05:09:12 +00:00

Integration tests: replace ansible_xxx with ansible_facts.xxx (#11479)

Replace ansible_xxx with ansible_facts.xxx.
This commit is contained in:
Felix Fontein 2026-02-07 18:18:48 +01:00 committed by GitHub
parent 106817316d
commit 476f2bf641
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
144 changed files with 548 additions and 578 deletions

View file

@ -7,9 +7,9 @@
# Fedora or RHEL >= 8
# This module requires the dnf module which is not available on RHEL 7.
- >
ansible_distribution == 'Fedora'
or (ansible_os_family == 'RedHat' and ansible_distribution != 'Fedora'
and ansible_distribution_major_version | int >= 8)
ansible_facts.distribution == 'Fedora'
or (ansible_facts.os_family == 'RedHat' and ansible_facts.distribution != 'Fedora'
and ansible_facts.distribution_major_version | int >= 8)
block:
- debug: var=copr_chroot
- name: enable copr project
@ -66,8 +66,8 @@
when:
# Copr does not build new packages for EOL Fedoras.
- >
not (ansible_distribution == 'Fedora' and
ansible_distribution_major_version | int < 35)
not (ansible_facts.distribution == 'Fedora' and
ansible_facts.distribution_major_version | int < 35)
block:
- name: install test package from the copr
ansible.builtin.package:

View file

@ -11,5 +11,5 @@ copr_repofile: '/etc/yum.repos.d/_copr:{{ copr_host }}:{{ copr_namespace }}:{{ c
# TODO: Fix chroot autodetection so this isn't necessary
_copr_chroot_fedora: "fedora-rawhide-x86_64"
_copr_chroot_rhelish: "epel-{{ ansible_distribution_major_version }}-x86_64"
copr_chroot: "{{ _copr_chroot_fedora if ansible_distribution == 'Fedora' else _copr_chroot_rhelish }}"
_copr_chroot_rhelish: "epel-{{ ansible_facts.distribution_major_version }}-x86_64"
copr_chroot: "{{ _copr_chroot_fedora if ansible_facts.distribution == 'Fedora' else _copr_chroot_rhelish }}"