您的位置:首页 > 产品设计 > UI/UE

[ansible学习笔记]Error: ansible requires the stdlib json or simplejson module, neither was found!

2017-02-28 22:16 579 查看
1、执行ansible命令的时候客户端rhel56-192.168.209.133 出现以下错误:
[root@reedoracle ansible]# ansible all -m command -a "python -V" -u reed
SSH password:
rhel56-192.168.209.133 | FAILED | rc=0 >>
Error: ansible requires the stdlib json or simplejson module, neither was found!
2、查看该客户端的python版本:
[root@localhost ~]# python -V
Python 2.4.3
3、错误原因:python版本过低
4、解决办法,二选一:
1)升级客户端的python版本至python2.5.x及以上
2)客户端上安装python-simplejson
附官方说明:
托管节点要求:
通常我们使用 ssh 与托管节点通信,默认使用 sftp.如果 sftp 不可用,可在 ansible.cfg 配置文件中配置成 scp 的方式. 在托管节点上也需要安装 Python 2.4 或以上的版本.如果版本低于 Python 2.5 ,还需要额外安装一个模块:
● python-simplejson
● 没安装python-simplejson,也可以使用Ansible的”raw”模块和script模块,因此从技术上讲,你可以通过Ansible的”raw”模块安装python-simplejson,之后就可以使用Ansible的所有功能了.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  python simplejson
相关文章推荐