使用OpenStack-Ansible部署Openstack,在安装Deployment Host时出现问题,执行到scripts/bootstrap-ansible.sh
出现了错误
(参考的是官方部署文档:https://docs.openstack.org/project-deploy-guide/openstack-ansible/zed/deploymenthost.html
TASK [Create temporary file for galaxy collection requirements] ****************************************************************
changed: [localhost]
TASK [Copy content into galaxy collection requirements temporary file] *********************************************************
changed: [localhost]
TASK [Install collection requirements with ansible galaxy] *********************************************************************
FAILED - RETRYING: [localhost]: Install collection requirements with ansible galaxy (5 retries left).
FAILED - RETRYING: [localhost]: Install collection requirements with ansible galaxy (4 retries left).
最后几行:
TASK [Install collection requirements with ansible galaxy] *********************************************************************
FAILED - RETRYING: [localhost]: Install collection requirements with ansible galaxy (5 retries left).
FAILED - RETRYING: [localhost]: Install collection requirements with ansible galaxy (4 retries left).
操作系统:Rocky Linux 9.2
OpenStack-Ansible版本:26.1.1 dev16
执行下述命令:sudo pip install -r requirements.txt
ansible-galaxy collection install openstack.cloud
成功安装部署用机。
去剧本里面,查查这个任务:TASK [Install collection requirements with ansible galaxy]
看看里面执行的是什么命令 ,然后你手动执行看看,
还有,galaxy ,需要连接到国外网站噶,也要确保你网络层面没问题。
根据你提供的信息,可能是 ansible-galaxy 无法正确下载 Ansible Galaxy 需求(collection)所需的依赖项,导致安装 Deployment Host 失败。
以下是一些可能的解决方案:
1.更新 Ansible 版本:请确保你的 Ansible 版本在 2.10 或更高版本,以便支持 Ansible Galaxy 需求管理器。可以使用以下命令检查版本:ansible --version
。如果需要更新,请使用以下命令更新:
sudo dnf upgrade ansible
2.手动安装 Ansible Galaxy:手动安装 Ansible Galaxy 需求管理器,然后再安装 openstack.cloud 需求。可以使用以下命令进行手动安装:
sudo pip install ansible-galaxy
sudo ansible-galaxy collection install openstack.cloud
3.清理并重新运行 bootstrap-ansible.sh 脚本:可以尝试清理 bootstrap-ansible.sh 脚本缓存并重新运行该脚本。可以使用以下命令清理缓存:
rm -rf ~/.ansible/collections/build/*
然后重新运行 bootstrap-ansible.sh 脚本:
./scripts/bootstrap-ansible.sh