This repository has been archived on 2024-05-02. You can view files and clone it, but cannot push or open issues or pull requests.
omni-ansible/roles/packages/tasks/centos-repos.yml

27 lines
856 B
YAML
Raw Normal View History

---
# NOTE: We assume- since this file literally has 'centos' in the name- that the
# ansible_distribution check has already been done at import time
- name: Enable Extra Packages for Enterprise Linux on CentOS 8
become: true
when: ansible_distribution_major_version == "8"
dnf:
state: latest
name: https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
- name: Enable the power tools repository on CentOS 8
become: true
when: ansible_distribution_major_version == "8"
lineinfile:
path: /etc/yum.repos.d/CentOS-PowerTools.repo
regexp: "enabled=(0|1)"
line: "enabled=1"
- name: Enable Extra Packages for Enterprise Linux on CentOS 7
become: true
when: ansible_distribution_major_version == "7"
dnf:
state: latest
name: https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpmz