nycrecords.yum_config_manager

Ansible 角色:Yum 配置管理器

GitHub 构建状态 Galaxy Ansible Ansible

此角色用于使用 yum-config-manager 在 RHEL 上管理软件源。

要求

Ansible 2.4 或更高版本

Red Hat Enterprise Linux 7 或等效版本

有效的 Red Hat 订阅

角色变量

当前支持以下变量:

  • rhui_config_path - 软件源配置文件的路径。默认为 /etc/yum.repos.d
  • rhui_config_name - 编辑的文件名称,用于软件源管理。默认为 redhat-rhui.repo
  • repositories - 指定要启用/禁用的软件源,详细信息如下

要启用/禁用特定软件源:

rhsm_repositories:
  enabled:
    - enabled-repository
  disabled:
    - disabled-repository

disabled 中的软件源列表在 enabled 之前处理。

依赖

此角色需要权限提升(sudo)才能正常工作。

示例剧本

提供一个如何使用此角色的示例(例如,作为参数传入变量)对用户也很有帮助:

- hosts: servers
  roles:
     - role: ansible-role-yum_config_manager
  vars:
    repositories:
      enabled:
        - rhui-REGION-rhel-server-rhscl
        - rhui-REGION-rhel-server-debug-rhscl
      disabled:
        - rhui-REGION-rhel-server-source-rh-common

许可证

Apache-2.0

作者信息

Joel Castillo (@joelbcastillo) 代表纽约市档案局开发团队 (@nycrecords)

关于项目

Role to use yum-config-manager to manage repositories on RHEL.

安装
ansible-galaxy install nycrecords.yum_config_manager
许可证
apache-2.0
下载
1.8k
拥有者