第 4 章 集成 Red Hat Satellite 和 Ansible Automation Controller
您可以集成 Red Hat Satellite 和 Ansible Automation Controller,以使用 Satellite 服务器作为 Ansible Automation Controller 的动态清单源。Ansible Automation Controller 是 Red Hat Ansible Automation Platform 的一个组件。
您还可以使用置备回调功能,从主机或 Ansible Automation Controller 在由 Satellite 管理的主机上运行 playbook。从 Satellite 服务器置备新主机时,您可以使用置备回调功能从 Ansible Automation Controller 触发 playbook 运行。playbook 在置备过程后配置主机。
要将 Satellite 服务器作为动态清单项目添加到 Ansible Automation Controller 中,您必须在 Ansible Automation Controller 上为 Satellite Server 用户创建一个凭证,将 Ansible Automation Controller 用户添加到凭据中,然后配置清单源。
前提条件
- 如果您的 Satellite 部署庞大,例如,管理数以千计的主机,使用非管理员用户可能会因为在授权检查期间可能出现可能出现的性能造成负面影响。对于大型部署,请考虑使用管理员用户。
-
对于非管理员用户,您必须将
Ansible Tower 清单 Reader角色分配给卫星服务器用户。有关管理用户、角色和权限过滤器的更多信息,请参阅管理 Red Hat Satellite 中的创建和管理角色。 - 您必须在同一网络或子网上托管 Satellite 服务器和 Ansible Automation Controller。
流程
在 Ansible Automation Controller Web UI 中,为您的 Satellite 创建凭证。有关创建凭证的更多信息,请参阅 自动化控制器用户指南中的 添加新 凭证和 Red Hat Satellite 凭证。
Expand 表 4.1. Satellite 凭证 凭证类型 : Red Hat Satellite 6 Satellite URL:
https://satellite.example.com
用户名 :
Satellite 用户的用户名及集成角色。
密码 :
Satellite 用户的密码。
- 将 Ansible Automation Controller 用户添加到新凭据。有关将用户添加到凭证的更多信息,请参阅 自动化控制器用户指南中的 凭证入门。
- 添加新清单。如需更多信息,请参阅 自动化控制器用户指南中的添加新清单。http://docs.ansible.com/automation-controller/latest/html/userguide/inventories.html#add-a-new-inventory
在新清单中,将卫星服务器添加为清单源,并指定以下清单源选项:如需更多信息,请参阅 自动化控制器用户指南中的添加源。https://docs.ansible.com/automation-controller/latest/html/userguide/inventories.html#add-source
Expand 表 4.2. 清单源选项 源 Red Hat Satellite 6 凭证
为卫星服务器创建的凭据。
覆盖
选择
覆盖变量
选择
启动时更新
选择
缓存超时
90
- 确保同步您添加的源。