下载地址:
https://pypi.org/
下载包:
ansible-2.9.7.tar.gz
asn1crypto-1.3.0.tar
bcrypt-3.1.7.tar
cffi-1.14.0.tar
cryptography-2.9.1.tar
ecdsa-0.15.tar
idna-2.9.tar
ipaddress-1.0.22.tar
Jinja2-2.11.2.tar
MarkupSafe-1.1.1.tar
paramiko-2.7.1.tar
pyasn1-0.4.8.tar
pycparser-2.20 (1).tar
pycrypto-2.6.1.tar
PyNaCl-1.3.0.tar
PyYAML-5.3.1.tar
setuptools-46.1.3
simplejson-3.17.0.tar
six-1.14.0.tar
1.选择历史版本,
2.找到自己需要的版本
3.点击download file下载文件
解压,安装所有的包
# 安装 setuptools unzip ansible-2.9.7.zip cd ansible-2.9.7 python setup.py install
[root@fastdfs128 ansible-2.9.7]# ansible --version /usr/lib/python2.7/site-packages/setuptools-46.1.3-py2.7.egg/pkg_resources/py2_warn.py:21: UserWarning: Setuptools will stop working on Python 2 ************************************************************ You are running Setuptools on Python 2, which is no longer supported and >>> SETUPTOOLS WILL STOP WORKING <<< in a subsequent release (no sooner than 2020-04-20). Please ensure you are installing Setuptools using pip 9.x or later or pin to `setuptools<45` in your environment. If you have done those things and are still encountering this message, please follow up at https://bit.ly/setuptools-py2-warning. ************************************************************ ansible 2.9.7 config file = /etc/ansible/ansible.cfg configured module search path = [u'/root/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules'] ansible python module location = /usr/lib/python2.7/site-packages/ansible-2.9.7-py2.7.egg/ansible executable location = /usr/bin/ansible python version = 2.7.5 (default, Aug 4 2017, 00:39:18) [GCC 4.8.5 20150623 (Red Hat 4.8.5-16)] [root@fastdfs128 ansible-2.9.7]#
# 修改Ansible配置文件位置 cp -a /opt/cosmo/com/ansible/ansible-2.9.7/examples/ansible.cfg /etc/ansible/ cp -a /opt/cosmo/com/ansible/ansible-2.9.7/examples/hosts /etc/ansible/ # 修改ansible.cfg文件开启日志 sed -i.bak 's/#log_path/log_path/' /etc/ansible/ansible.cfg