Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Ansible playbook to enable EPEL + REMI repo. Tested on CentOS 6+ and RHEL 7
---
- 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