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