相对yum安装,pip安装的好处是jinjia版本到了2.8
pip安装ansible
Successfully installed MarkupSafe-1.0 PyYAML-3.12 ansible-2.2.1.0 jinja2-2.8.1 paramiko-2.1.2 pyasn1-0.2.3 pycrypto-2.6.1
0环境
centos7.2
[[email protected] ~]# uname -r
3.10.0-514.6.1.el7.x86_64
1,优化pip
yum install python-pip
cat /root/.pip
[[email protected] ~]# cat pip.conf
[global]
index-url = http://mirrors.aliyun.com/pypi/simple/
?
[install]
trusted-host=mirrors.aliyun.com
2,安装ansible依赖
yum install gcc libffi-devel python-devel openssl-devel -y
pip install cryptography
?
3,安装ansible
pip install ansible
?
?
不安装依赖会报错
时间: 2024-10-06 20:10:37