mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 22:02:50 +00:00
[PR #11479/476f2bf6 backport][stable-12] Integration tests: replace ansible_xxx with ansible_facts.xxx (#11480)
Integration tests: replace ansible_xxx with ansible_facts.xxx (#11479)
Replace ansible_xxx with ansible_facts.xxx.
(cherry picked from commit 476f2bf641)
Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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 }}"
|
||||
|
||||
Reference in New Issue
Block a user