roles(system/el): create a role for EL distros

Signed-off-by: Matej Focko <me@mfocko.xyz>
This commit is contained in:
Matej Focko 2023-08-30 15:39:18 +02:00
parent 16d977227c
commit 657f0e30ea
Signed by: mfocko
GPG key ID: 7C47D46246790496
2 changed files with 30 additions and 0 deletions

View file

@ -8,6 +8,10 @@
become: true
when: ansible_distribution == "Fedora"
- role: system/el
become: true
when: ansible_distribution in [ "AlmaLinux", "CentOS" ]
# Upgrade all packages and install the basic-bitch ones
- role: system/base
become: true

View file

@ -0,0 +1,26 @@
---
- name: Enable EPEL
ansible.builtin.package:
name: epel-release
state: present
- name: Enable CRB for CentOS Stream
community.general.ini_file:
path: /etc/yum.repos.d/centos.repo
section: crb
option: enabled
value: 1
create: no
when: ansible_distribution == "CentOS"
- name: Enable CRB and Plus repositories for AlmaLinux
community.general.ini_file:
path: /etc/yum.repos.d/almalinux-{{ item }}.repo
section: "{{ item }}"
option: enabled
value: 1
create: no
when: ansible_distribution == "AlmaLinux"
loop:
- crb
- plus