Ethan Paul
f1639dce1e
The overall config this will end up with is going to be nowhere near complicated enough to require the segmented structure of roles. A single directory of reusable tasks and resources will be much better
33 lines
1.1 KiB
YAML
33 lines
1.1 KiB
YAML
---
|
|
- name: Install repositories on CentOS 8
|
|
when: ansible_distribution == "CentOS" and ansible_distribution_major_version == "8"
|
|
become: true
|
|
block:
|
|
- name: Enable Extra Packages for Enterprise Linux on CentOS 8
|
|
dnf:
|
|
state: present
|
|
name: https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
|
|
|
|
# The testing repo had to be enabled for a previous version of systemd-networkd
|
|
# to be installed
|
|
- name: Disable EPEL-Testing repository on CentOS 8
|
|
lineinfile:
|
|
path: /etc/yum.repos.d/epel-testing.repo
|
|
regexp: "enabled=(0|1)"
|
|
line: "enabled=0"
|
|
insertbefore: "^$"
|
|
firstmatch: true
|
|
|
|
- name: Enable the power tools repository on CentOS 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 == "CentOS" and ansible_distribution_major_version == "7"
|
|
yum:
|
|
state: present
|
|
name: https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
|