Repository: geerlingguy/ansible-role-repo-epel Branch: master Commit: 157f53dbe25c Files: 14 Total size: 9.1 KB Directory structure: gitextract_2g_aixg_/ ├── .ansible-lint ├── .github/ │ ├── FUNDING.yml │ └── workflows/ │ ├── ci.yml │ ├── release.yml │ └── stale.yml ├── .gitignore ├── .yamllint ├── LICENSE ├── README.md ├── defaults/ │ └── main.yml ├── meta/ │ └── main.yml ├── molecule/ │ └── default/ │ ├── converge.yml │ └── molecule.yml └── tasks/ └── main.yml ================================================ FILE CONTENTS ================================================ ================================================ FILE: .ansible-lint ================================================ skip_list: - 'yaml' - 'role-name' ================================================ FILE: .github/FUNDING.yml ================================================ # These are supported funding model platforms --- github: geerlingguy patreon: geerlingguy ================================================ FILE: .github/workflows/ci.yml ================================================ --- name: CI 'on': pull_request: push: branches: - master schedule: - cron: "30 1 * * 5" defaults: run: working-directory: 'geerlingguy.repo-epel' jobs: lint: name: Lint runs-on: ubuntu-latest steps: - name: Check out the codebase. uses: actions/checkout@v4 with: path: 'geerlingguy.repo-epel' - name: Set up Python 3. uses: actions/setup-python@v5 with: python-version: '3.13' # Can't go to 3.14+ until Ansible 13.x - name: Install test dependencies. run: pip3 install yamllint - name: Lint code. run: | yamllint . molecule: name: Molecule runs-on: ubuntu-latest strategy: matrix: distro: - rockylinux9 steps: - name: Check out the codebase. uses: actions/checkout@v4 with: path: 'geerlingguy.repo-epel' - name: Set up Python 3. uses: actions/setup-python@v5 with: python-version: '3.13' # Can't go to 3.14+ until Ansible 13.x - name: Install test dependencies. run: pip3 install ansible molecule molecule-plugins[docker] docker - name: Run Molecule tests. run: molecule test env: PY_COLORS: '1' ANSIBLE_FORCE_COLOR: '1' MOLECULE_DISTRO: ${{ matrix.distro }} ================================================ FILE: .github/workflows/release.yml ================================================ --- # This workflow requires a GALAXY_API_KEY secret present in the GitHub # repository or organization. # # See: https://github.com/marketplace/actions/publish-ansible-role-to-galaxy # See: https://github.com/ansible/galaxy/issues/46 name: Release 'on': push: tags: - '*' defaults: run: working-directory: 'geerlingguy.repo-epel' jobs: release: name: Release runs-on: ubuntu-latest steps: - name: Check out the codebase. uses: actions/checkout@v4 with: path: 'geerlingguy.repo-epel' - name: Set up Python 3. uses: actions/setup-python@v5 with: python-version: '3.13' # Can't go to 3.14+ until Ansible 13.x - name: Install Ansible. run: pip3 install ansible-core - name: Trigger a new import on Galaxy. run: > ansible-galaxy role import --api-key ${{ secrets.GALAXY_API_KEY }} $(echo ${{ github.repository }} | cut -d/ -f1) $(echo ${{ github.repository }} | cut -d/ -f2) ================================================ FILE: .github/workflows/stale.yml ================================================ --- name: Close inactive issues 'on': schedule: - cron: "55 13 * * 5" # semi-random time jobs: close-issues: runs-on: ubuntu-latest permissions: issues: write pull-requests: write steps: - uses: actions/stale@v8 with: days-before-stale: 120 days-before-close: 60 exempt-issue-labels: bug,pinned,security,planned exempt-pr-labels: bug,pinned,security,planned stale-issue-label: "stale" stale-pr-label: "stale" stale-issue-message: | This issue has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 30 days. Thank you for your contribution! Please read [this blog post](https://www.jeffgeerling.com/blog/2020/enabling-stale-issue-bot-on-my-github-repositories) to see the reasons why I mark issues as stale. close-issue-message: | This issue has been closed due to inactivity. If you feel this is in error, please reopen the issue or file a new issue with the relevant details. stale-pr-message: | This pr has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 30 days. Thank you for your contribution! Please read [this blog post](https://www.jeffgeerling.com/blog/2020/enabling-stale-issue-bot-on-my-github-repositories) to see the reasons why I mark issues as stale. close-pr-message: | This pr has been closed due to inactivity. If you feel this is in error, please reopen the issue or file a new issue with the relevant details. repo-token: ${{ secrets.GITHUB_TOKEN }} ================================================ FILE: .gitignore ================================================ *.retry */__pycache__ *.pyc .cache ================================================ FILE: .yamllint ================================================ --- extends: default rules: line-length: max: 140 level: warning ignore: | .github/workflows/stale.yml ================================================ FILE: LICENSE ================================================ The MIT License (MIT) Copyright (c) 2017 Jeff Geerling Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ================================================ FILE: README.md ================================================ # Ansible Role: EPEL Repository [![CI](https://github.com/geerlingguy/ansible-role-repo-epel/actions/workflows/ci.yml/badge.svg)](https://github.com/geerlingguy/ansible-role-repo-epel/actions/workflows/ci.yml) Installs the [EPEL repository](https://fedoraproject.org/wiki/EPEL) (Extra Packages for Enterprise Linux) for RHEL/CentOS. ## Requirements This role only is needed/runs on RHEL and its derivatives. ## Role Variables Available variables are listed below, along with default values (see `defaults/main.yml`): epel_repo_url: "http://download.fedoraproject.org/pub/epel/{{ ansible_facts.distribution_major_version }}/{{ ansible_userspace_architecture }}{{ '/' if ansible_facts.distribution_major_version < '7' else '/e/' }}epel-release-{{ ansible_facts.distribution_major_version }}-{{ epel_release[ansible_facts.distribution_major_version] }}.noarch.rpm" epel_repo_gpg_key_url: "/etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-{{ ansible_facts.distribution_major_version }}" The EPEL repo URL and GPG key URL. Generally, these should not be changed, but if this role is out of date, or if you need a very specific version, these can both be overridden. epel_repo_disable: false Set to `true` to disable the EPEL repo (even if already installed). ## Dependencies None. ## Example Playbook - hosts: servers roles: - geerlingguy.repo-epel ## License MIT / BSD ## Author Information This role was created in 2014 by [Jeff Geerling](https://www.jeffgeerling.com/), author of [Ansible for DevOps](https://www.ansiblefordevops.com/). ================================================ FILE: defaults/main.yml ================================================ --- epel_repo_url: "https://dl.fedoraproject.org/pub/epel/epel-release-latest-{{ ansible_facts.distribution_major_version }}.noarch.rpm" epel_repo_gpg_key_url: "https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-{{ ansible_facts.distribution_major_version }}" epel_repofile_path: "/etc/yum.repos.d/epel.repo" epel_repo_disable: false ================================================ FILE: meta/main.yml ================================================ --- dependencies: [] galaxy_info: role_name: repo-epel author: geerlingguy description: EPEL repository for RHEL/CentOS. company: "Midwestern Mac, LLC" license: "license (BSD, MIT)" min_ansible_version: 2.10 platforms: # I begrudgingly support EL here, only because EPEL is also # critical to use of many projects on downstream projects. - name: EL versions: - 7 - 8 galaxy_tags: - packaging - epel - repository - repo - redhat - centos - rhel ================================================ FILE: molecule/default/converge.yml ================================================ --- - name: Converge hosts: all #become: true roles: - role: geerlingguy.repo-epel ================================================ FILE: molecule/default/molecule.yml ================================================ --- role_name_check: 1 dependency: name: galaxy options: ignore-errors: true driver: name: docker platforms: - name: instance image: "geerlingguy/docker-${MOLECULE_DISTRO:-rockylinux9}-ansible:latest" command: ${MOLECULE_DOCKER_COMMAND:-""} volumes: - /sys/fs/cgroup:/sys/fs/cgroup:rw cgroupns_mode: host privileged: true pre_build_image: true provisioner: name: ansible playbooks: converge: ${MOLECULE_PLAYBOOK:-converge.yml} ================================================ FILE: tasks/main.yml ================================================ --- - name: Check if EPEL repo is already configured. stat: path: "{{ epel_repofile_path }}" register: epel_repofile_result - name: Import EPEL GPG key. rpm_key: key: "{{ epel_repo_gpg_key_url }}" state: present register: result until: result is succeeded retries: 5 delay: 10 when: not epel_repofile_result.stat.exists ignore_errors: "{{ ansible_check_mode }}" - name: Install EPEL repo. yum: name: "{{ epel_repo_url }}" state: present register: result until: result is succeeded retries: 5 delay: 10 when: not epel_repofile_result.stat.exists - name: Disable Main EPEL repo. ini_file: path: "/etc/yum.repos.d/epel.repo" section: epel option: enabled value: "{{ epel_repo_disable | ternary(0, 1) }}" no_extra_spaces: true mode: 0644