pescobar.katello_client
pescobar.katello_client
将节点注册到 Katello
该角色仅会禁用 CentOS 的默认 yum 仓库。未在 RedHat 上测试
角色变量
katello_client_katello_server_hostname: katello.example.com
katello_client_activationkey: compute_nodes_production
katello_client_org_id: sciCORE
katello_client_rhsm_baseurl: "https://{{ katello_client_katello_server_hostname }}/pulp/repos"
katello_client_force_register: false
katello_client_extra_packages:
- katello-host-tools
- katello-host-tools-tracer
- katello-host-tools-fact-plugin
katello_client_install_agent: false # katello-agent 已被弃用,因此您可能不希望使用它
# 如果您希望使用上游仓库,请将此变量设置为 true
# 通常您不会这样做,因为您的 katello 实例也会提供此仓库
katello_client_yum_repo_add: false
katello_client_yum_repo_rpm: https://yum.theforeman.org/client/2.4/el7/x86_64/foreman-client-release.rpm
katello_client_disable_yum_fastest_mirror_plugin: true
# 要在 katello 客户端中禁用的上游仓库列表
katello_client_repos_to_update:
- name: base
file: CentOS-Base
description: 默认基础 yum 仓库
mirrorlist: http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os&infra=$infra
gpgcheck: true
gpgkey: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
enabled: false
- name: updates
file: CentOS-Base
description: 默认更新 yum 仓库
mirrorlist: http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates&infra=$infra
gpgcheck: true
gpgkey: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
enabled: false
- name: extras
file: CentOS-Base
description: 默认附加 yum 仓库
mirrorlist: http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras&infra=$infra
gpgcheck: true
gpgkey: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
enabled: false
- name: epel
file: epel
description: epel
metalink: https://mirrors.fedoraproject.org/metalink?repo=epel-7&arch=$basearch
gpgcheck: 1
gpgkey: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
enabled: false
示例剧本
- hosts: servers
roles:
- { role: pescobar.katello_agent }
许可证
GPLv3
分子测试
该仓库包含一些分子测试,以检查注册节点的完整过程。
定义所需变量后,可以尝试 molecule test
来验证其是否正常工作。
Github 中的 Travis-CI 仅执行语法检查。
作者信息
Pablo Escobar Lopez