pip 指定目录安装 ansible 到/etc/ansible

在CentOS 7.3上,由于yum安装的最新版ansible存在BUG,无法使用playbook roles模板安装nginx。为解决此问题,采用python-pip安装ansible 1.9版本,并详细描述了在已安装ansible前提下,如何通过pip在/etc/ansible目录下成功安装,并确保配置文件可用的过程。
摘要由CSDN通过智能技术生成

pip安装ansible

因为我的Linux的是CentOS Linux release 7.3.1611 (Core),使用的ali仓库源。

我在yum安装的ansible是

[root@node4 ~]# ansible --version
ansible 2.3.2.0
  config file = /etc/ansible/ansible.cfg
  configured module search path = Default w/o overrides
  python version = 2.7.5 (default, Nov  6 2016, 00:28:07) [GCC 4.8.5 20150623 (Red Hat 4.8.5-11)]

由于要使用playbook roles模板自动安装nginx,但该版本存在着BUG,所以只能降到ansible 1.9版本(经过亲测,可以使用)。

所以使用python-pip 安装 ansible1.9版本

yum install -y python-pip
pip install ansible==1.9.1
但在pip install ansible==1.9.1,出现pip版本过低的问题。

You are using pip version 8.1.2, however version 9.0.1 is available.
You should consider upgrading via the 'pip install --upg
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值