configure-mirrors: Consolidate dnf/yum handler
Simplify logic by using a single handler for redhat systems. Change-Id: I328f0abb602f0d71372812ff64d8ad3f3764fbd0
This commit is contained in:
parent
2e684a8da5
commit
d3a52f108d
@ -7,19 +7,15 @@
|
||||
tags:
|
||||
- skip_ansible_lint
|
||||
|
||||
- name: Update dnf cache
|
||||
- name: Update yum/dnf cache
|
||||
become: yes
|
||||
command: "{{ item }}"
|
||||
args:
|
||||
warn: false
|
||||
with_items:
|
||||
- dnf clean all
|
||||
- dnf makecache
|
||||
|
||||
- name: Update yum cache
|
||||
become: yes
|
||||
command: "{{ item }}"
|
||||
with_items:
|
||||
- yum clean all
|
||||
- yum makecache
|
||||
- "{{ ansible_pkg_mgr }} clean all"
|
||||
- "{{ ansible_pkg_mgr }} makecache -v"
|
||||
# verbose is needed in order to make it possible to debug potential failures
|
||||
|
||||
- name: Update zypper cache
|
||||
become: yes
|
||||
|
@ -1,3 +1,8 @@
|
||||
- name: gather needed facts
|
||||
when: ansible_pkg_mgr is not defined
|
||||
setup:
|
||||
gather_subset: pkg_mgr
|
||||
|
||||
- name: Set up infrastructure mirrors
|
||||
include: mirror.yaml
|
||||
when: mirror_fqdn is defined
|
||||
|
@ -10,7 +10,7 @@
|
||||
- etc/yum.repos.d/CentOS-Base.repo
|
||||
- etc/yum.repos.d/epel.repo
|
||||
notify:
|
||||
- Update yum cache
|
||||
- Update yum/dnf cache
|
||||
|
||||
# http://dnf.readthedocs.io/en/latest/conf_ref.html#options-for-both-main-and-repo
|
||||
# deltarpm is useful when the bottleneck is the network throughput.
|
||||
|
@ -13,7 +13,7 @@
|
||||
- etc/yum.repos.d/CentOS-PowerTools.repo
|
||||
- etc/yum.repos.d/epel.repo
|
||||
notify:
|
||||
- Update dnf cache
|
||||
- Update yum/dnf cache
|
||||
|
||||
# http://dnf.readthedocs.io/en/latest/conf_ref.html#options-for-both-main-and-repo
|
||||
# deltarpm is useful when the bottleneck is the network throughput.
|
||||
|
@ -10,7 +10,7 @@
|
||||
- etc/yum.repos.d/fedora.repo
|
||||
- etc/yum.repos.d/fedora-updates.repo
|
||||
notify:
|
||||
- Update dnf cache
|
||||
- Update yum/dnf cache
|
||||
|
||||
# http://dnf.readthedocs.io/en/latest/conf_ref.html#options-for-both-main-and-repo
|
||||
# deltarpm is useful when the bottleneck is the network throughput.
|
||||
|
Loading…
Reference in New Issue
Block a user