Last active
January 7, 2025 12:51
-
-
Save mariusv/71e6e75941d495956234 to your computer and use it in GitHub Desktop.
Ansible playbook to enable EPEL + REMI repo. Tested on CentOS 6+ and RHEL 7
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- hosts: all | |
sudo: yes | |
tasks: | |
- name: Install EPEL repo. | |
yum: | |
name: https://dl.fedoraproject.org/pub/epel/epel-release-latest-{{ ansible_distribution_major_version }}.noarch.rpm | |
state: present | |
- name: Import EPEL GPG key. | |
rpm_key: | |
key: /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-{{ ansible_distribution_major_version }} | |
state: present | |
- name: Install remi repo. | |
yum: | |
name: http://rpms.famillecollet.com/enterprise/remi-release-{{ ansible_distribution_major_version }}.rpm | |
state: present | |
- name: Import remi GPG key. | |
rpm_key: | |
key: http://rpms.remirepo.net/RPM-GPG-KEY-remi | |
state: present |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
May need to import the keys prior to installing the repo