Merge "configure-mirrors: Consolidate dnf/yum handler"

This commit is contained in:
Zuul 2019-10-19 07:45:07 +00:00 committed by Gerrit Code Review
commit 0d39fba5fe
5 changed files with 14 additions and 13 deletions

View File

@ -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

View File

@ -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

View File

@ -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.

View File

@ -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.

View File

@ -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.