dc32b52f08
Adds support for configuration of DNF repo mirrors for CentOS and EPEL repositories, as well as custom repositories. Adds support for DNF automatic, which is a replacement for yum-cron. Configuration is backwards compatible, falling back to the equivalent yum variables when DNF variables have not been overridden. Change-Id: I8bef5e9c8e1c77c25d6077ff690da8f2cde6a643 Story: 2006574 Task: 38922
47 lines
876 B
YAML
47 lines
876 B
YAML
---
|
|
- name: Copy CentOS repo templates
|
|
template:
|
|
src: "{{ item }}.j2"
|
|
dest: /etc/yum.repos.d/{{ item }}
|
|
owner: root
|
|
group: root
|
|
mode: 0664
|
|
become: True
|
|
loop:
|
|
- CentOS-AppStream.repo
|
|
- CentOS-Base.repo
|
|
- CentOS-Extras.repo
|
|
|
|
- name: Update cache
|
|
dnf:
|
|
name: []
|
|
update_cache: yes
|
|
become: True
|
|
|
|
# NOTE(mgoddard): Install epel-release to ensure it does not get installed
|
|
# later and override our repo file.
|
|
- name: Install epel-release
|
|
dnf:
|
|
name: epel-release
|
|
state: installed
|
|
become: True
|
|
when: dnf_install_epel | bool
|
|
|
|
- name: Copy EPEL repo templates
|
|
template:
|
|
src: "{{ item }}.j2"
|
|
dest: /etc/yum.repos.d/{{ item }}
|
|
owner: root
|
|
group: root
|
|
mode: 0664
|
|
become: True
|
|
loop:
|
|
- epel.repo
|
|
- epel-modular.repo
|
|
|
|
- name: Update cache
|
|
dnf:
|
|
name: []
|
|
update_cache: yes
|
|
become: True
|