ansible支持python版本_Ansible版本不同导致需要不同Python版本运行

本文讨论了Ansible在管理Python2.4系统时遇到的问题,包括Ansible2.3是最后一个支持Python2.4的版本。提出了升级Python、安装python-simplejson、使用raw模块等解决方案,并提供了在CentOS 6.5和7.5上安装Ansible的多种方法,包括pip和rpm安装,以及处理安装过程中遇到的错误。
摘要由CSDN通过智能技术生成

由于在导入Ansible做自动化管理时,服务器版本太老,导致Python也相应比较旧,新版本的Ansible无法调用相关模块来管控。

Ansible2.3是最后一个版本支持Python2.4和Python2.5的,以下是官方内容:

链接:https://docs.ansible.com/ansible/devel/dev_guide/developing_python_3.html#minimum-version-of-python-3-x-and-python-2-x

Python 2.4 Module-side Support:

Support for Python 2.4 and Python 2.5 was dropped in Ansible-2.4. RHEL-5 (and its rebuilds like CentOS-5) were supported until April of 2017. Ansible-2.3 was released in April of 2017 and was the last Ansible release to support Python 2.4 on the module-side.

对于如何使用ansible管理RHEL5.X等这些Python2.4的系统,有以下几种方法:

1.升级服务器端的python版本---个人不推荐,如需详细可以百度,当然,成功升级后就不局限于Ansible2.3这个版本了,可以使用较高版本。

2.在每台被管理的服务器上安装python-simplejson,参考资料如下:

链接:https://docs.ansible.com/ansible/2.3/intro_installation.html

On the managed nodes, you need

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值