1fd4e05c59
I8bf75ce44b9ec1fdd477fcddf2deebf2929d9fc1 added a workaround to remove incorrectly named DNF repository files. This workaround has been in place since the Antelope release and can now be removed. Change-Id: I7ba61ffa8aaabcedf1c5249e5f39f39257410f9a
49 lines
998 B
YAML
49 lines
998 B
YAML
---
|
|
- name: Copy Rocky/CentOS repo templates
|
|
vars:
|
|
repo_file_prefix: "{{ ansible_facts.distribution | lower }}"
|
|
template:
|
|
src: "{{ item }}.j2"
|
|
dest: /etc/yum.repos.d/{{ item }}
|
|
owner: root
|
|
group: root
|
|
mode: 0664
|
|
become: True
|
|
loop:
|
|
- "{{ repo_file_prefix }}.repo"
|
|
- "{{ repo_file_prefix }}-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
|
|
when: dnf_install_epel | bool
|
|
|
|
- name: Update cache
|
|
dnf:
|
|
name: []
|
|
update_cache: yes
|
|
become: True
|
|
when: dnf_install_epel | bool
|