2021-05-02 17:12:46 +12:00
|
|
|
---
|
|
|
|
|
- name: Converge
|
|
|
|
|
hosts: all
|
2024-08-18 11:02:04 +12:00
|
|
|
pre_tasks:
|
2024-08-18 11:44:24 +12:00
|
|
|
- name: Check if cleanup is completed already
|
|
|
|
|
ansible.builtin.stat:
|
|
|
|
|
path: /etc/epel-cleanup
|
|
|
|
|
register: cleanup
|
|
|
|
|
|
2024-08-18 11:02:04 +12:00
|
|
|
- name: Ensure EPEL is not present
|
|
|
|
|
yum:
|
|
|
|
|
name: epel-release
|
2024-08-18 11:44:24 +12:00
|
|
|
disablerepo:
|
|
|
|
|
- epel
|
2024-08-18 11:02:04 +12:00
|
|
|
state: absent
|
2024-08-18 11:44:24 +12:00
|
|
|
when: not cleanup.stat.exists
|
|
|
|
|
changed_when: false
|
2024-08-18 11:02:04 +12:00
|
|
|
|
|
|
|
|
- name: Remove any traces of EPEL
|
|
|
|
|
shell: rm -f /etc/yum.repos.d/epel*
|
2024-08-18 11:44:24 +12:00
|
|
|
when: not cleanup.stat.exists
|
|
|
|
|
changed_when: false
|
|
|
|
|
|
|
|
|
|
- name: Create file confirming cleanup
|
|
|
|
|
file:
|
|
|
|
|
path: /etc/epel-cleanup
|
|
|
|
|
state: touch
|
|
|
|
|
when: not cleanup.stat.exists
|
|
|
|
|
changed_when: false
|
2024-08-18 11:02:04 +12:00
|
|
|
|
2021-05-02 17:12:46 +12:00
|
|
|
tasks:
|
|
|
|
|
- name: "Include repo-almalinux"
|
|
|
|
|
include_role:
|
2021-05-02 21:55:48 +12:00
|
|
|
name: "{{ lookup('env', 'MOLECULE_PROJECT_DIRECTORY') | basename }}"
|
2021-05-02 17:12:46 +12:00
|
|
|
vars:
|
|
|
|
|
epel_specify_mirror: true
|
2021-05-02 22:11:51 +12:00
|
|
|
epel_mirror_url: "{{ lookup('env', 'EPEL_MIRROR_URL') }}"
|