python 版本问题,导致ansible提示报错
2016-03-15 15:30
344 查看
[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
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
相关文章推荐
- 基于 ANSIBLE 自动化运维实践
- 集群运维自动化工具ansible之使用playbook安装zabbix客户端
- linux 自动化运维工具ansible的使用详细教程
- Python利用ansible分发处理任务
- Puppet,Chef,Ansible的共性
- Ansible中Playbook方法的标准输出定义
- Ansible之playbook自动完成硬盘分区,格式化,挂盘,并远程创建用户
- 自动化运维学习--python
- ansible常用模块用法
- ansible学习笔记(四):when在include中使用
- 浅谈开源工具自动化运维阶段
- linux ansible 自动化部署工具
- 节点配置文件(Inventory) 详解
- Ansible 安装与简单使用
- 自动化运维工具ansible学习+使用ansible批量推送公钥到远程主机[学习马哥]
- Operations-ansible-01
- Ansible
- AIX 6.1安装python
- ansible 连接 windows (通过powershell)