mullholland.repository_epel

Ansible角色repository_epel

将epel仓库添加到系统

GitHub 下载 版本
github downloads Version

示例剧本

此示例来自molecule/default/converge.yml,并在每次推送、拉取请求和发布时进行测试。

---
- name: 合并
  hosts: all
  become: true
  gather_facts: true
  # vars:
  #   example_var: "value"
  roles:
    - role: "mullholland.repository_epel"

机器需要做好准备。在CI中,这可以通过molecule/default/prepare.yml完成:

---
- name: 准备
  hosts: all
  become: true
  gather_facts: true

  roles:
    # - role: mullholland.repository_codereadybuilder
    #   when:
    #     - (ansible_distribution == "RedHat" and ansible_distribution_major_version == "8") or
    #       (ansible_distribution == "CentOS" and ansible_distribution_major_version == "9")
    - role: mullholland.repository_powertools
      when:
        - ansible_distribution in [ "CentOS", "Rocky", "AlmaLinux" ]
        - ansible_distribution_major_version == "8"

角色变量

变量的默认值设置在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"

要求

上下文

此角色是多个兼容角色的一部分。有关更多信息,请查看这些角色的文档

以下是相关角色的概述: dependencies

兼容性

此角色已在以下容器镜像上进行测试:

容器 标签
EL 所有
Amazon 候选

所需的最低Ansible版本为2.10,测试已完成:

  • 以前的版本。
  • 当前版本。
  • 开发版本。

如果您发现问题,请在GitHub中报告它们。

许可证

MIT

作者信息

Mullholland

关于项目

Add the epel Repository to the System

安装
ansible-galaxy install mullholland.repository_epel
许可证
apache-2.0
下载
4.8k
拥有者