> {"changed": false,"checksum": "41b65edf4...">
当前位置:   article > 正文

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

ansible支持python版本_python 版本问题,导致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

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/从前慢现在也慢/article/detail/464084
推荐阅读
相关标签
  

闽ICP备14008679号