[
  {
    "path": ".ansible-lint",
    "content": "skip_list:\n  - 'yaml'\n  - 'role-name'\n"
  },
  {
    "path": ".github/FUNDING.yml",
    "content": "# These are supported funding model platforms\n---\ngithub: geerlingguy\npatreon: geerlingguy\n"
  },
  {
    "path": ".github/workflows/ci.yml",
    "content": "---\nname: CI\n'on':\n  pull_request:\n  push:\n    branches:\n      - master\n  schedule:\n    - cron: \"30 1 * * 5\"\n\ndefaults:\n  run:\n    working-directory: 'geerlingguy.repo-epel'\n\njobs:\n\n  lint:\n    name: Lint\n    runs-on: ubuntu-latest\n    steps:\n      - name: Check out the codebase.\n        uses: actions/checkout@v4\n        with:\n          path: 'geerlingguy.repo-epel'\n\n      - name: Set up Python 3.\n        uses: actions/setup-python@v5\n        with:\n          python-version: '3.13'  # Can't go to 3.14+ until Ansible 13.x\n\n      - name: Install test dependencies.\n        run: pip3 install yamllint\n\n      - name: Lint code.\n        run: |\n          yamllint .\n\n  molecule:\n    name: Molecule\n    runs-on: ubuntu-latest\n    strategy:\n      matrix:\n        distro:\n          - rockylinux9\n\n    steps:\n      - name: Check out the codebase.\n        uses: actions/checkout@v4\n        with:\n          path: 'geerlingguy.repo-epel'\n\n      - name: Set up Python 3.\n        uses: actions/setup-python@v5\n        with:\n          python-version: '3.13'  # Can't go to 3.14+ until Ansible 13.x\n\n      - name: Install test dependencies.\n        run: pip3 install ansible molecule molecule-plugins[docker] docker\n\n      - name: Run Molecule tests.\n        run: molecule test\n        env:\n          PY_COLORS: '1'\n          ANSIBLE_FORCE_COLOR: '1'\n          MOLECULE_DISTRO: ${{ matrix.distro }}\n"
  },
  {
    "path": ".github/workflows/release.yml",
    "content": "---\n# This workflow requires a GALAXY_API_KEY secret present in the GitHub\n# repository or organization.\n#\n# See: https://github.com/marketplace/actions/publish-ansible-role-to-galaxy\n# See: https://github.com/ansible/galaxy/issues/46\n\nname: Release\n'on':\n  push:\n    tags:\n      - '*'\n\ndefaults:\n  run:\n    working-directory: 'geerlingguy.repo-epel'\n\njobs:\n\n  release:\n    name: Release\n    runs-on: ubuntu-latest\n    steps:\n      - name: Check out the codebase.\n        uses: actions/checkout@v4\n        with:\n          path: 'geerlingguy.repo-epel'\n\n      - name: Set up Python 3.\n        uses: actions/setup-python@v5\n        with:\n          python-version: '3.13'  # Can't go to 3.14+ until Ansible 13.x\n\n      - name: Install Ansible.\n        run: pip3 install ansible-core\n\n      - name: Trigger a new import on Galaxy.\n        run: >\n          ansible-galaxy role import --api-key ${{ secrets.GALAXY_API_KEY }}\n          $(echo ${{ github.repository }} | cut -d/ -f1) $(echo ${{ github.repository }} | cut -d/ -f2)\n"
  },
  {
    "path": ".github/workflows/stale.yml",
    "content": "---\nname: Close inactive issues\n'on':\n  schedule:\n    - cron: \"55 13 * * 5\"  # semi-random time\n\njobs:\n  close-issues:\n    runs-on: ubuntu-latest\n    permissions:\n      issues: write\n      pull-requests: write\n    steps:\n      - uses: actions/stale@v8\n        with:\n          days-before-stale: 120\n          days-before-close: 60\n          exempt-issue-labels: bug,pinned,security,planned\n          exempt-pr-labels: bug,pinned,security,planned\n          stale-issue-label: \"stale\"\n          stale-pr-label: \"stale\"\n          stale-issue-message: |\n            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!\n            \n            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.\n          close-issue-message: |\n            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.\n          stale-pr-message: |\n            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!\n            \n            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.\n          close-pr-message: |\n            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.\n          repo-token: ${{ secrets.GITHUB_TOKEN }}\n"
  },
  {
    "path": ".gitignore",
    "content": "*.retry\n*/__pycache__\n*.pyc\n.cache\n\n"
  },
  {
    "path": ".yamllint",
    "content": "---\nextends: default\n\nrules:\n  line-length:\n    max: 140\n    level: warning\n\nignore: |\n  .github/workflows/stale.yml\n"
  },
  {
    "path": "LICENSE",
    "content": "The MIT License (MIT)\n\nCopyright (c) 2017 Jeff Geerling\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\nthe Software, and to permit persons to whom the Software is furnished to do so,\nsubject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\nFOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\nIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\nCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n"
  },
  {
    "path": "README.md",
    "content": "# Ansible Role: EPEL Repository\n\n[![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)\n\nInstalls the [EPEL repository](https://fedoraproject.org/wiki/EPEL) (Extra Packages for Enterprise Linux) for RHEL/CentOS.\n\n## Requirements\n\nThis role only is needed/runs on RHEL and its derivatives.\n\n## Role Variables\n\nAvailable variables are listed below, along with default values (see `defaults/main.yml`):\n\n    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\"\n    epel_repo_gpg_key_url: \"/etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-{{ ansible_facts.distribution_major_version }}\"\n\nThe 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.\n\n    epel_repo_disable: false\n\nSet to `true` to disable the EPEL repo (even if already installed).\n\n## Dependencies\n\nNone.\n\n## Example Playbook\n\n    - hosts: servers\n      roles:\n        - geerlingguy.repo-epel\n\n## License\n\nMIT / BSD\n\n## Author Information\n\nThis role was created in 2014 by [Jeff Geerling](https://www.jeffgeerling.com/), author of [Ansible for DevOps](https://www.ansiblefordevops.com/).\n"
  },
  {
    "path": "defaults/main.yml",
    "content": "---\nepel_repo_url: \"https://dl.fedoraproject.org/pub/epel/epel-release-latest-{{ ansible_facts.distribution_major_version }}.noarch.rpm\"\nepel_repo_gpg_key_url: \"https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-{{ ansible_facts.distribution_major_version }}\"\nepel_repofile_path: \"/etc/yum.repos.d/epel.repo\"\nepel_repo_disable: false\n"
  },
  {
    "path": "meta/main.yml",
    "content": "---\ndependencies: []\n\ngalaxy_info:\n  role_name: repo-epel\n  author: geerlingguy\n  description: EPEL repository for RHEL/CentOS.\n  company: \"Midwestern Mac, LLC\"\n  license: \"license (BSD, MIT)\"\n  min_ansible_version: 2.10\n  platforms:\n    # I begrudgingly support EL here, only because EPEL is also\n    # critical to use of many projects on downstream projects.\n    - name: EL\n      versions:\n        - 7\n        - 8\n  galaxy_tags:\n    - packaging\n    - epel\n    - repository\n    - repo\n    - redhat\n    - centos\n    - rhel\n"
  },
  {
    "path": "molecule/default/converge.yml",
    "content": "---\n- name: Converge\n  hosts: all\n  #become: true\n\n  roles:\n    - role: geerlingguy.repo-epel\n"
  },
  {
    "path": "molecule/default/molecule.yml",
    "content": "---\nrole_name_check: 1\ndependency:\n  name: galaxy\n  options:\n    ignore-errors: true\ndriver:\n  name: docker\nplatforms:\n  - name: instance\n    image: \"geerlingguy/docker-${MOLECULE_DISTRO:-rockylinux9}-ansible:latest\"\n    command: ${MOLECULE_DOCKER_COMMAND:-\"\"}\n    volumes:\n      - /sys/fs/cgroup:/sys/fs/cgroup:rw\n    cgroupns_mode: host\n    privileged: true\n    pre_build_image: true\nprovisioner:\n  name: ansible\n  playbooks:\n    converge: ${MOLECULE_PLAYBOOK:-converge.yml}\n"
  },
  {
    "path": "tasks/main.yml",
    "content": "---\n- name: Check if EPEL repo is already configured.\n  stat:\n    path: \"{{ epel_repofile_path }}\"\n  register: epel_repofile_result\n\n- name: Import EPEL GPG key.\n  rpm_key:\n    key: \"{{ epel_repo_gpg_key_url }}\"\n    state: present\n  register: result\n  until: result is succeeded\n  retries: 5\n  delay: 10\n  when: not epel_repofile_result.stat.exists\n  ignore_errors: \"{{ ansible_check_mode }}\"\n\n- name: Install EPEL repo.\n  yum:\n    name: \"{{ epel_repo_url }}\"\n    state: present\n  register: result\n  until: result is succeeded\n  retries: 5\n  delay: 10\n  when: not epel_repofile_result.stat.exists\n\n- name: Disable Main EPEL repo.\n  ini_file:\n    path: \"/etc/yum.repos.d/epel.repo\"\n    section: epel\n    option: enabled\n    value: \"{{ epel_repo_disable | ternary(0, 1) }}\"\n    no_extra_spaces: true\n    mode: 0644\n"
  }
]