diff --git a/playbooks/bootstrap.yml b/playbooks/bootstrap.yml index 69bde6a..24b486f 100644 --- a/playbooks/bootstrap.yml +++ b/playbooks/bootstrap.yml @@ -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 diff --git a/roles/system/el/tasks/main.yml b/roles/system/el/tasks/main.yml new file mode 100644 index 0000000..0c8a30f --- /dev/null +++ b/roles/system/el/tasks/main.yml @@ -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