ansible [core 2.12.2]
config file = /etc/ansible/ansible.cfg
configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python3.9/site-packages/ansible
ansible collection location = /root/.ansible/collections:/usr/share/ansible/collections
executable location = /usr/bin/ansible
python version = 3.9.10 (main, Feb 9 2022, 00:00:00) [GCC 11.2.1 20220127 (Red Hat 11.2.1-9)]
jinja version = 2.11.3
libyaml = True
总结
在 RHEL 9 上安装 Ansible Core 非常简单,只需通过系统自带的 AppStream 仓库即可完成。以下是关键点:
- 使用 AppStream 仓库:Ansible Core 已包含在 RHEL 9 的 AppStream 仓库中,无需额外配置。
- 安装命令:使用
sudo dnf install ansible-core安装 Ansible Core。 - 验证安装:通过
ansible --version命令验证 Ansible 是否正确安装。
通过以上步骤,您可以在 RHEL 9 上快速安装并开始使用 Ansible。