2.2. 从 Ansible Engine 迁移到 Ansible Core
在 RHEL 8.6 及更新版本版本中,Ansible Core 替换了 Ansible Engine。从 Ansible Engine 迁移到 Ansible Core,以启用红帽产品生成的 Ansible 自动化内容,并从 RHEL 8.6 发行版本获取支持 RHEL Ansible 内容所需的所有功能。
先决条件
- 有对一个或多个受管节点(您要使用 RHEL 系统角色配置的系统)的访问权限。
- 对 控制节点 的访问和权限,控制节点是 Red Hat Ansible Engine 用来配置其他系统的系统。
在控制节点上:
-
已安装 RHEL 8.6 或更高版本。您可以使用
cat /etc/redhat-release
命令验证 RHEL 版本。 -
rhel-system-roles
软件包已安装。 - 列出受管节点的清单文件。
流程
卸载 Ansible Engine:
yum remove ansible
# yum remove ansible
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 禁用
ansible-2-for-rhel-8-x86_64-rpms
存储库:subscription-manager repos --disable ansible-2-for-rhel-8-x86_64-rpms
# subscription-manager repos --disable ansible-2-for-rhel-8-x86_64-rpms
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 安装 Ansible Core,它包括在 RHEL 8 AppStream 存储库中:
yum install ansible-core
# yum install ansible-core
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
验证
检查您的系统中是否存在
ansible-core
软件包:yum info ansible-core
# yum info ansible-core
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
如果您的系统中确实存在 ansible-core
软件包,命令输出有关软件包名称、版本、发行版本、大小等信息: