l3d.epel

role_install-epel-release

Ansible role for installing the Extra Packages for Enterprise Linux (EPEL) Repository on RHEL and CentOS.

What does this do?

  • It reads the configuration variables you set and uses default values.
  • If enabled (default is false), it checks if you're using an older version of this role.
  • It confirms that the GPG key for the EPEL repository matches what's in your config.
  • It installs the EPEL repository from a remote URL.

How to use this role

You can use this role from Ansible Galaxy or download it manually.

To install via Ansible Galaxy

ansible-galaxy install do1jlr.epel

Example playbook using Ansible Galaxy

---
- name: Install EPEL release
  hosts: srv01.example.com
  roles:
    - do1jlr.epel

To manually download the role

# Download to your roles directory
git clone https://github.com/roles-ansible/role_install-epel-release.git

Manual playbook example

---
- name: Install EPEL release
  hosts: srv02.example.com
  tags:
   - epel
  vars:
    submodules_versioncheck: true
  roles:
    - role_install-epel-release

Variables and Configuration

Here are the default values you can change:

# Do we want a simple version check? (true is recommended)
submodules_versioncheck: false

# EPEL repository settings
epel_repo:
  url: "https://dl.fedoraproject.org/pub/epel/epel-release-latest-{{ ansible_distribution_major_version }}.noarch.rpm"
  gpg_key_url: "https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-{{ ansible_distribution_major_version }}"
  gpg_key_path: "/etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-{{ ansible_distribution_major_version }}"
  fingerprint:
    '6': "8C3B E96A F230 9184 DA5C 0DAE 3B49 DF2A 0608 B895"
    '7': "91E9 7D7C 4A5E 96F1 7F3E 888F 6A2F AEA2 352C 64E5"
    '8': "94E2 79EB 8D8F 25B2 1810 ADF1 21EA 45AB 2F86 D6A1"

Testing

This role has been tested with various CentOS versions using GitHub Actions. Linting is checked via Travis CI. For more details about the tests, check the GitHub Marketplace.

Test Status GitHub Marketplace
Galaxy release Publish Ansible Role to Galaxy
Ansible check centos:latest Ansible test with CentOS:latest
Ansible check centos:centos8 Ansible test with CentOS 8
Ansible check centos:centos7 Ansible test with CentOS 7
Yamllint GitHub Actions Ansible Linting Test
Informazioni sul progetto

Ansible role to install the Extra Packages for Enterprise Linux (EPEL) - Repository on RHEL/centos

Installa
ansible-galaxy install l3d.epel
Licenza
mit
Download
36.7k
Proprietario
Ansible roles provide a framework for fully independent, or interdependent collections of variables,tasks,files,templates &modules. Here we maintain some. enjoy