1.7. 同步 Ansible 集合
在 Satellite 中,您可以从 Private Automation Hub、console.redhat.com
和其他 Satellite 实例同步 Ansible Collections。在同步后,Ansible Collections 将会出现在 Satellite web UI 菜单的 Content 下作为一个新的仓库类型。
流程
- 在 Satellite Web UI 中,导航到 Content > Products。
- 选择所需的产品名称。
- 在 Products 窗口中,选择要为其创建存储库的产品名称。
- 单击 Repositories 选项卡,然后单击 New Repository。
在 Name 字段中输入存储库的名称。
Label 字段会根据名称自动填充。
- 从 Type 列表中,选择 ansible collection。
在 Upstream URL 字段中,输入上游集合存储库的 URL。
URL 可以是任何 Ansible Galaxy 端点。例如:
https://console.redhat.com/api/automation-hub/
。可选:在 requirements.yml 字段中,您可以指定您要从端点同步的集合列表及其版本。
如果没有指定集合列表,来自端点的所有内容都会同步。
--- collections: - name: my_namespace.my_collection version: 1.2.3
如需更多信息,请参阅 Galaxy 用户指南中的安装带有要求文件的多个集合。
进行身份验证。
要从 Private Automation Hub 同步 Satellite,请在 Auth Token 字段中输入您的令牌。
如需更多信息,请参阅连接到 Hub 中的连接私有 Automation Hub。
要从
console.redhat.com
同步 Satellite,请在 Auth Token 字段中输入您的令牌,并在 Auth URL 字段中输入您的 SSO URL。如需更多信息,请参阅开始使用自动化中心。
- 要从 Satellite 同步 Satellite,请将两个身份验证字段留空。
- 点击 Save。
- 导航到 Ansible Collections 存储库。
- 在 Select Action 菜单中,选择 Sync Now。