mullholland.repository_epel

Ansible Role: repository_epel

This role adds the epel Repository to your system.

GitHub Downloads Version
github downloads Version

Example Playbook

This example is from molecule/default/converge.yml and is tested with each update.

---
- name: Converge
  hosts: all
  become: true
  gather_facts: true
  roles:
    - role: "mullholland.repository_epel"

Before using the playbook, make sure your machine is ready. In CI, this is done using molecule/default/prepare.yml:

---
- name: Prepare
  hosts: all
  become: true
  gather_facts: true
  roles:
    - role: mullholland.repository_powertools
      when:
        - ansible_distribution in [ "CentOS", "Rocky", "AlmaLinux" ]
        - ansible_distribution_major_version == "8"

Role Variables

Default variable values are in defaults/main.yml:

---
repository_epel_key_url: "https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-{{ repository_epel_version }}"

_repository_epel_version:
  RedHat:
    "7": 7
    "8": 8
  CentOS:
    "7": 7
    "8": 8
    "9": 9
  Rocky:
    "8": 8
  AlmaLinux:
    "8": 8
  Amazon:
    "2": 7

repository_epel_version: "{{ _repository_epel_version[ansible_distribution][ansible_distribution_major_version] }}"

repository_epel_packages:
  RedHat:
    "7":
      - "https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm"
    "8":
      - "https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm"
  CentOS:
    "7":
      - "epel-release"
    "8":
      - "epel-release"
      - "epel-next-release"
    "9":
      - "https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm"
      - "https://dl.fedoraproject.org/pub/epel/epel-next-release-latest-9.noarch.rpm"
  Rocky:
    "8":
      - "epel-release"
  AlmaLinux:
    "8":
      - "epel-release"
  Amazon:
    "2":
      - "https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm"

Requirements

Context

This role works with many other compatible roles. Check the documentation of these roles for more information.

Here's a visual overview of related roles: dependencies

Compatibility

The role has been tested with these container images:

Container Tags
EL all
Amazon Candidate

Ansible version 2.10 or newer is required. Testing has been done on:

  • Previous versions
  • Current version
  • Development version

If you encounter issues, please report them on GitHub.

License

This role is licensed under the MIT License.

Author Information

Created by Mullholland.

Informazioni sul progetto

Add the epel Repository to the System

Installa
ansible-galaxy install mullholland.repository_epel
Licenza
apache-2.0
Download
4.8k
Proprietario