码迷,mamicode.com
首页 > 编程语言 > 详细

python 版本问题,导致ansible提示报错

时间:2016-03-16 01:50:20      阅读:863      评论:0      收藏:0      [点我收藏+]

标签:ansible

[root@ansible-server ~]# ansible mongodb -m copy -a "src=/etc/yum.repos.d/mongodb-org-3.2.repo dest=/etc/yum.repos.d/"

SSH password: 

10.8.21.9 | success >> {

    "changed": false, 

    "checksum": "41b65edf420e087a9f8c66993338251f87008fba", 

    "dest": "/etc/yum.repos.d/mongodb-org-3.2.repo", 

    "gid": 0, 

    "group": "root", 

    "mode": "0644", 

    "owner": "root", 

    "path": "/etc/yum.repos.d/mongodb-org-3.2.repo", 

    "size": 143, 

    "state": "file", 

    "uid": 0

}


10.8.21.12 | success >> {

    "changed": false, 

    "checksum": "41b65edf420e087a9f8c66993338251f87008fba", 

    "dest": "/etc/yum.repos.d/mongodb-org-3.2.repo", 

    "gid": 0, 

    "group": "root", 

    "mode": "0644", 

    "owner": "root", 

    "path": "/etc/yum.repos.d/mongodb-org-3.2.repo", 

    "size": 143, 

    "state": "file", 

    "uid": 0

}


10.8.21.8 | FAILED >> {

    "checksum": "41b65edf420e087a9f8c66993338251f87008fba", 

    "failed": true, 

    "msg": "Error: ansible requires the stdlib json or simplejson module, neither was found!"

}


10.8.21.11 | success >> {

    "changed": false, 

    "checksum": "41b65edf420e087a9f8c66993338251f87008fba", 

    "dest": "/etc/yum.repos.d/mongodb-org-3.2.repo", 

    "gid": 0, 

    "group": "root", 

    "mode": "0644", 

    "owner": "root", 

    "path": "/etc/yum.repos.d/mongodb-org-3.2.repo", 

    "size": 143, 

    "state": "file", 

    "uid": 0

}

受控节点查看Python版本

[root@ansible-test1 ~]# python -V

Python 2.4.3


解决问题:

1,更新Python

2,节点上安装 python-simplejson 


python 版本问题,导致ansible提示报错

标签:ansible

原文地址:http://475766.blog.51cto.com/465766/1751297

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!