mirror of
https://github.com/ansible-collections/community.docker.git
synced 2026-07-29 11:55:04 +00:00
Use ansible_facts.xxx instead of ansible_xxx. (#1237)
This commit is contained in:
@@ -12,20 +12,20 @@
|
||||
pkg_mgr: community.general.pkgng
|
||||
ansible_pkg_mgr: community.general.pkgng
|
||||
cacheable: true
|
||||
when: ansible_os_family == "FreeBSD"
|
||||
when: ansible_facts.os_family == "FreeBSD"
|
||||
|
||||
- ansible.builtin.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"
|
||||
|
||||
- ansible.builtin.shell:
|
||||
# noqa: command-instead-of-module
|
||||
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'
|
||||
|
||||
- ansible.builtin.shell:
|
||||
# noqa: command-instead-of-module
|
||||
@@ -33,4 +33,4 @@
|
||||
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'
|
||||
|
||||
Reference in New Issue
Block a user