master 157f53dbe25c cached
14 files
9.1 KB
2.9k tokens
1 requests
Download .txt
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
Download .txt
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
Condensed preview — 14 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (10K chars).
[
  {
    "path": ".ansible-lint",
    "chars": 38,
    "preview": "skip_list:\n  - 'yaml'\n  - 'role-name'\n"
  },
  {
    "path": ".github/FUNDING.yml",
    "chars": 91,
    "preview": "# These are supported funding model platforms\n---\ngithub: geerlingguy\npatreon: geerlingguy\n"
  },
  {
    "path": ".github/workflows/ci.yml",
    "chars": 1387,
    "preview": "---\nname: CI\n'on':\n  pull_request:\n  push:\n    branches:\n      - master\n  schedule:\n    - cron: \"30 1 * * 5\"\n\ndefaults:\n"
  },
  {
    "path": ".github/workflows/release.yml",
    "chars": 1023,
    "preview": "---\n# This workflow requires a GALAXY_API_KEY secret present in the GitHub\n# repository or organization.\n#\n# See: https:"
  },
  {
    "path": ".github/workflows/stale.yml",
    "chars": 1769,
    "preview": "---\nname: Close inactive issues\n'on':\n  schedule:\n    - cron: \"55 13 * * 5\"  # semi-random time\n\njobs:\n  close-issues:\n "
  },
  {
    "path": ".gitignore",
    "chars": 36,
    "preview": "*.retry\n*/__pycache__\n*.pyc\n.cache\n\n"
  },
  {
    "path": ".yamllint",
    "chars": 117,
    "preview": "---\nextends: default\n\nrules:\n  line-length:\n    max: 140\n    level: warning\n\nignore: |\n  .github/workflows/stale.yml\n"
  },
  {
    "path": "LICENSE",
    "chars": 1080,
    "preview": "The MIT License (MIT)\n\nCopyright (c) 2017 Jeff Geerling\n\nPermission is hereby granted, free of charge, to any person obt"
  },
  {
    "path": "README.md",
    "chars": 1568,
    "preview": "# Ansible Role: EPEL Repository\n\n[![CI](https://github.com/geerlingguy/ansible-role-repo-epel/actions/workflows/ci.yml/b"
  },
  {
    "path": "defaults/main.yml",
    "chars": 338,
    "preview": "---\nepel_repo_url: \"https://dl.fedoraproject.org/pub/epel/epel-release-latest-{{ ansible_facts.distribution_major_versio"
  },
  {
    "path": "meta/main.yml",
    "chars": 523,
    "preview": "---\ndependencies: []\n\ngalaxy_info:\n  role_name: repo-epel\n  author: geerlingguy\n  description: EPEL repository for RHEL/"
  },
  {
    "path": "molecule/default/converge.yml",
    "chars": 94,
    "preview": "---\n- name: Converge\n  hosts: all\n  #become: true\n\n  roles:\n    - role: geerlingguy.repo-epel\n"
  },
  {
    "path": "molecule/default/molecule.yml",
    "chars": 477,
    "preview": "---\nrole_name_check: 1\ndependency:\n  name: galaxy\n  options:\n    ignore-errors: true\ndriver:\n  name: docker\nplatforms:\n "
  },
  {
    "path": "tasks/main.yml",
    "chars": 813,
    "preview": "---\n- name: Check if EPEL repo is already configured.\n  stat:\n    path: \"{{ epel_repofile_path }}\"\n  register: epel_repo"
  }
]

About this extraction

This page contains the full source code of the geerlingguy/ansible-role-repo-epel GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 14 files (9.1 KB), approximately 2.9k tokens. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!