首页 > 代码库 > centos7.2 pip安装ansible

centos7.2 pip安装ansible

相对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

[root@node162 ~]# uname -r

3.10.0-514.6.1.el7.x86_64

1,优化pip

yum install python-pip

cat /root/.pip

[root@node162 ~]# 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

?

?

不安装依赖会报错

技术分享

centos7.2 pip安装ansible