roles(system/el): create a role for EL distros
Signed-off-by: Matej Focko <me@mfocko.xyz>
This commit is contained in:
parent
16d977227c
commit
657f0e30ea
2 changed files with 30 additions and 0 deletions
|
@ -8,6 +8,10 @@
|
||||||
become: true
|
become: true
|
||||||
when: ansible_distribution == "Fedora"
|
when: ansible_distribution == "Fedora"
|
||||||
|
|
||||||
|
- role: system/el
|
||||||
|
become: true
|
||||||
|
when: ansible_distribution in [ "AlmaLinux", "CentOS" ]
|
||||||
|
|
||||||
# Upgrade all packages and install the basic-bitch ones
|
# Upgrade all packages and install the basic-bitch ones
|
||||||
- role: system/base
|
- role: system/base
|
||||||
become: true
|
become: true
|
||||||
|
|
26
roles/system/el/tasks/main.yml
Normal file
26
roles/system/el/tasks/main.yml
Normal 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
|
Loading…
Reference in a new issue