ansible 2.7.5升级2.9.10
1.Python环境切换原来默认是pthon2.7,切换为python3我这里安装路径是/usr/local/bin,仅供参考mv /usr/bin/python/usr/bin/python2.7mv /usr/local/bin/python3 /usr/local/bin/pythonmv /usr/local/bin/python /usr/bin/pythoncp /usr/local/
·
1.Python环境切换
之前ansible旧版本可以用pthon2.7.5,升级到2.9以后的新版本所以需要切换为python3
这里安装路径是/usr/local/bin,可根据实际路径修改
先删除软连接,就是python系统默认的快捷方式
rm -rf /usr/bin/python
rm -rf /usr/bin/pip
ln -s /usr/local/bin/python3 /usr/bin/python
ln -s /usr/local/bin/pip3 /usr/bin/pip
2.pip安装ansible-2.9.10升级
pip install ansible-2.9.10.tar.gz
pip -V
pip 18.1 from /usr/local/lib/python3.6/site-packages/pip (python 3.6)
python -V
Python 3.6.9
ansible --version
ansible 2.9.10
config file = /etc/ansible/ansible.cfg
configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/local/lib/python3.6/site-packages/ansible
executable location = /usr/local/bin/ansible
python version = 3.6.9 (default, Oct 15 2019, 16:15:56) [GCC 4.8.5 20150623 (Red Hat 4.8.5-28)]
更多推荐
已为社区贡献2条内容
所有评论(0)