2.2. 使用 Web 控制台将 Red Hat Automation Hub 配置为内容的主要源
使用 Web 控制台将 Red Hat Automation Hub 配置为您的内容主要来源。要配置自动化中心,您必须创建一个凭证并将其添加到机构的 Galaxy Credentials 字段中。使用自动化中心,您可以访问经过认证且受支持的集合。
先决条件
- 您已获取 Automation Hub 服务器的 API 令牌。如需更多信息 ,请参阅创建 Red Hat Automation hub API 令牌。
Creating a new token revokes any previous tokens generated for Private Automation Hub. Ensure that you update any Controller or scripts that you created with the previous token.
流程
- 进入 Automation Controller。
创建新凭据。
- 从 Credentials 屏幕中点 Add。
- 在 Name 字段中输入新凭证的名称。
- 可选:输入描述并输入或选择与凭证关联的机构名称。
- 在 Organization 下,选择您要使用凭据的组织。
- 选择 Ansible Galaxy/Automation Hub API Token 作为凭证类型。
- 在 Type Details 下,输入在先决条件中创建的 Galaxy 服务器 URL、身份验证服务器 URL 和 API Token。
- 点击 Save。
从机构的 Galaxy Credentials 字段中选择您创建的凭证。
- 导航到 Access → Organizations。
- 选择您要在其中添加 Galaxy 凭据的组织。
- 点 Edit。
- 在 Galaxy Credentials 下,点 搜索 图标。
- 选择您为自动化中心创建的凭证,并将其放在列表的开头。
- 可选:如果您有辅助内容源,如 Ansible Galaxy,请在您为自动化中心创建的凭证后放置此凭证。
- 点 Select。
- 点击 Save。
验证
要验证凭据,请选择项目并单击 Refresh 图标来更新基于现有的源控制管理(SCM)项目。
- 导航到您的项目存储库。
-
选择一个使用
collections/requirements.yml文件的项目。 - 点刷新图标 [refresh icon] 来更新项目。
如果项目的状态为 Successful,则凭据有效。
现在,您已使用 Web 控制台将 Automation Hub 配置为主服务器,您可以继续下载并安装支持的集合。
其他资源
- 有关服务器列表配置选项以及使用 Ansible Galaxy 作为 Ansible 内容源的更多信息,请参阅 Ansible Galaxy 用户指南。
- 如需有关创建和使用凭证的更多信息,请参阅自动化控制器用户指南 v4.2.1 中的凭证部分。https://docs.ansible.com/automation-controller/4.2.1/html/userguide/credentials.html