我需要使用旧版本的 Ansible (2.9)。我使用add-apt-repository ppa:ansible/ansible-2.9
. 当我ansible --version
以 root 身份运行时,我得到:
ansible 2.9.6
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/dist-packages/ansible
executable location = /usr/bin/ansible
python version = 3.8.5 (default, Jul 28 2020, 12:59:40) [GCC 9.3.0]
但是,当我运行与普通用户相同的命令时,我得到:
ansible 2.10.3
config file = /etc/ansible/ansible.cfg
configured module search path = ['/home/christopher/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /home/christopher/.local/lib/python3.8/site-packages/ansible
executable location = /usr/bin/ansible
python version = 3.8.5 (default, Jul 28 2020, 12:59:40) [GCC 9.3.0]
我不知道发生了什么。我现在什至不能使用 Ansible,因为每个 playbook 都因为它无法识别诸如package
. 我在哪里可以找到这个 2.10.3 版本并摆脱它!?