This documentation is for a release that is no longer maintained
See documentation for the latest supported version 3 or the latest supported version 4.12.4.5. 下载 playbook 的依赖项
简化用户置备基础架构安装过程的 Ansible playbook 需要几个 Python 模块。在您要运行安装程序的机器上添加模块的仓库,然后下载它们。
注意
这些说明假设您使用 Red Hat Enterprise Linux(RHEL)8。
先决条件
- Python 3 已安装在您的机器上。
流程
在命令行中添加软件仓库:
使用 Red Hat Subscription Manager 注册:
sudo subscription-manager register # If not done already
$ sudo subscription-manager register # If not done already
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 获取最新的订阅数据:
sudo subscription-manager attach --pool=$YOUR_POOLID # If not done already
$ sudo subscription-manager attach --pool=$YOUR_POOLID # If not done already
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 禁用当前的软件仓库:
sudo subscription-manager repos --disable=* # If not done already
$ sudo subscription-manager repos --disable=* # If not done already
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 添加所需的软件仓库:
sudo subscription-manager repos \ --enable=rhel-8-for-x86_64-baseos-rpms \ --enable=openstack-16-tools-for-rhel-8-x86_64-rpms \ --enable=ansible-2.9-for-rhel-8-x86_64-rpms \ --enable=rhel-8-for-x86_64-appstream-rpms
$ sudo subscription-manager repos \ --enable=rhel-8-for-x86_64-baseos-rpms \ --enable=openstack-16-tools-for-rhel-8-x86_64-rpms \ --enable=ansible-2.9-for-rhel-8-x86_64-rpms \ --enable=rhel-8-for-x86_64-appstream-rpms
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
安装模块:
sudo yum install python3-openstackclient ansible python3-openstacksdk python3-netaddr
$ sudo yum install python3-openstackclient ansible python3-openstacksdk python3-netaddr
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 确保
python
命令指向python3
:sudo alternatives --set python /usr/bin/python3
$ sudo alternatives --set python /usr/bin/python3
Copy to Clipboard Copied! Toggle word wrap Toggle overflow