mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-04 01:13:00 +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:
parent
de6967d3ff
commit
7fce59fbc6
144 changed files with 548 additions and 578 deletions
|
|
@ -24,5 +24,5 @@
|
|||
|
||||
- name: Remove EXTERNALLY-MANAGED file
|
||||
file:
|
||||
path: /usr/lib/python{{ ansible_python.version.major }}.{{ ansible_python.version.minor }}/EXTERNALLY-MANAGED
|
||||
path: /usr/lib/python{{ ansible_facts.python.version.major }}.{{ ansible_facts.python.version.minor }}/EXTERNALLY-MANAGED
|
||||
state: absent
|
||||
|
|
|
|||
|
|
@ -12,34 +12,34 @@
|
|||
pkg_mgr: community.general.pkgng
|
||||
ansible_pkg_mgr: community.general.pkgng
|
||||
cacheable: true
|
||||
when: ansible_os_family == "FreeBSD"
|
||||
when: ansible_facts.os_family == "FreeBSD"
|
||||
|
||||
- set_fact:
|
||||
pkg_mgr: community.general.zypper
|
||||
ansible_pkg_mgr: community.general.zypper
|
||||
cacheable: true
|
||||
when: ansible_os_family == "Suse"
|
||||
when: ansible_facts.os_family == "Suse"
|
||||
|
||||
- set_fact:
|
||||
pkg_mgr: community.general.pacman
|
||||
ansible_pkg_mgr: community.general.pacman
|
||||
cacheable: true
|
||||
when: ansible_os_family == "Archlinux"
|
||||
when: ansible_facts.os_family == "Archlinux"
|
||||
|
||||
- shell:
|
||||
cmd: |
|
||||
sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/*.repo
|
||||
sed -i 's%#baseurl=http://mirror.centos.org/%baseurl=https://vault.centos.org/%g' /etc/yum.repos.d/*.repo
|
||||
when: ansible_distribution in 'CentOS' and ansible_distribution_major_version == '7'
|
||||
when: ansible_facts.distribution in 'CentOS' and ansible_facts.distribution_major_version == '7'
|
||||
|
||||
- shell:
|
||||
cmd: |
|
||||
sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-Linux-*.repo
|
||||
sed -i 's%#baseurl=http://mirror.centos.org/$contentdir/$releasever/%baseurl=https://vault.centos.org/8.4.2105/%g' /etc/yum.repos.d/CentOS-Linux-*.repo
|
||||
ignore_errors: true # This fails for CentOS Stream 8
|
||||
when: ansible_distribution in 'CentOS' and ansible_distribution_major_version == '8'
|
||||
when: ansible_facts.distribution in 'CentOS' and ansible_facts.distribution_major_version == '8'
|
||||
|
||||
- when: ansible_os_family == "Archlinux"
|
||||
- when: ansible_facts.os_family == "Archlinux"
|
||||
block:
|
||||
- name: ArchLinux specific setup
|
||||
include_tasks: archlinux.yml
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue