Linux 下编译安装 ansible
文章
林里克斯
实验平台:
CentOS Linux release 7.6.1810
ansible version:
ansible 2.9.9
1.官网
https://releases.ansible.com/ansible/
https://github.com/ansible/ansible
2.安装依赖
$ yum -y install gcc gcc-c++ python-devel make wget unzip
3.安装依赖模块
- setuptools
$ wget https://files.pythonhosted.org/packages/37/1b/b25507861991beeade31473868463dad0e58b1978c209de27384ae541b0b/setuptools-40.6.3.zip
$ unzip setuptools-40.6.3.zip
$ cd setuptools-51.0.0
$ python setup.py install
- pycrypto
$ wget https://pypi.python.org/packages/source/p/pycrypto/pycrypto-2.6.1.tar.gz
$ tar xf pycrypto-2.6.1.tar.gz
$ cd pycrypto-2.6.1
$ python setup.py install
- PyYAML
$ wget https://pypi.python.org/packages/source/P/PyYAML/PyYAML-3.11.tar.gz
$ tar xf PyYAML-3.11.tar.gz
$ cd PyYAML-3.11
$ python setup.py install
- MarkupSafe (Jinja依赖)
$ wget https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-0.9.3.tar.gz
$ tar xf MarkupSafe-0.9.3.tar.gz
$ cd MarkupSafe-0.9.3
$ python setup.py install
- Jinja2
$ wget https://pypi.python.org/packages/source/J/Jinja2/Jinja2-2.7.3.tar.gz
$ Jinja2-2.7.3.tar.gz
$ cd Jinja2-2.7.3
$ python setup.py install
4.编译安装 ansible
$ wget https://releases.ansible.com/ansible/ansible-latest.tar.gz
$ tar xf ansible-latest.tar.gz
$ cd ansible-2.9.13/
$ python setup.py install
5.验证
$ ansible --version
/usr/lib/python2.7/site-packages/ansible-2.9.9-py2.7.egg/ansible/parsing/vault/__init__.py:44: CryptographyDeprecationWarning: Python 2 is no longer supported by the Python core team. Support for it is now deprecated in cryptography, and will be removed in the next release.
from cryptography.exceptions import InvalidSignature
ansible 2.9.9
config file = None
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.9-py2.7.egg/ansible
executable location = /usr/bin/ansible
python version = 2.7.5 (default, Nov 16 2020, 22:23:17) [GCC 4.8.5 20150623 (Red Hat 4.8.5-44)]
#表示 ansible 最新已在渐渐不支持 python2 ,建议将其升级为 Python3
后续升级下相应版本
Over~
版权协议须知!
本篇文章来源于 Uambiguous ,如本文章侵犯到任何版权问题,请立即告知本站,本站将及时予与删除并致以最深的歉意
1574 0 2020-12-15
博主卡片
运维时间
搭建这个平台,只为分享及记载自己所遇之事和难题。
现在时间 2024-12-28
今日天气
随机推荐
09-22
MySQL 5.7 忘记 root 密码
08-05
Linux 搭建 DNS 服务器
08-03
在 Linux 下搭建 FTP 及配置文件详解
03-25
Nginx ./configure 参数详解
01-19
Linux 三种方式安装 MySQL
站点统计
- 文章总数:241篇
- 分类总数:29个
- 评论总数:12条
- 本站总访问量 353171 次
@xiaozi 最后的分享的镜像下载地址打不开 服务器没有开机吗?
@yuanyuan 为什么我的4b安装centos7.9 插上tf卡 显示不兼...
@Wong arrhenius 牛比
@MakerFace 厉害了!
@TongSir 老哥 更新下我的友链链接 https://blog.ton...