Sorin Sbarnea d3a52f108d configure-mirrors: Consolidate dnf/yum handler
Simplify logic by using a single handler for redhat systems.

Change-Id: I328f0abb602f0d71372812ff64d8ad3f3764fbd0
2019-10-15 18:21:44 +01:00

26 lines
676 B
YAML

- name: Install CentOS repository files
become: yes
template:
dest: "/{{ item }}"
group: root
mode: 0644
owner: root
src: "centos7/{{ item }}.j2"
with_items:
- etc/yum.repos.d/CentOS-Base.repo
- etc/yum.repos.d/epel.repo
notify:
- 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.
# It also requires additional drpm packages to be hosted by the mirrors which
# is not done by default.
- name: Disable deltrarpm
become: yes
ini_file:
path: /etc/yum.conf
section: main
option: deltarpm
value: 0