无法安装正确版本的Ansible



我安装了ansible==5.0,但所需的是在2.10-2.11之间。现在,每次我试图删除它时,它都会显示WARNING: Skipping ansible as it is not installed.。但当我运行命令ansible --version时,输出显示ansible安装了ansible [core 2.12.3]版本

我还尝试在它上面安装所需的版本,该版本再次成功安装,但当版本命令再次运行时,它会显示以前的版本。

(kolla-ansible-venv) root@ubuntu:/home/kypo/Desktop# sudo pip3 uninstall --yes ansible
WARNING: Skipping ansible as it is not installed.
(kolla-ansible-venv) root@ubuntu:/home/kypo/Desktop# apt remove ansible
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package 'ansible' is not installed, so not removed
The following packages were automatically installed and are no longer required:
libfprint-2-tod1 libfwupdplugin1 libllvm10
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
(kolla-ansible-venv) root@ubuntu:/home/kypo/Desktop# ansible --version
ansible [core 2.12.3]
config file = /etc/ansible/ansible.cfg
configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /home/kolla-ansible-venv/lib/python3.8/site-packages/ansible
ansible collection location = /root/.ansible/collections:/usr/share/ansible/collections
executable location = /home/kolla-ansible-venv/bin/ansible
python version = 3.8.10 (default, Nov 26 2021, 20:14:08) [GCC 9.3.0]
jinja version = 3.0.3
libyaml = True
(kolla-ansible-venv) root@ubuntu:/home/kypo/Desktop# sudo pip uninstall --yes ansible
WARNING: Skipping ansible as it is not installed.
(kolla-ansible-venv) root@ubuntu:/home/kypo/Desktop# 

实际上,我想通过以下链接安装openstack。

请从ansible服务器删除添加应用程序或创建新的VM并在服务器中安装gitpython3python3-pip,然后克隆Kolla ansible repo并从requirement.txt文件安装所有依赖项。这是安装kolla ansible而不依赖的最简单方法。

最新更新