[Email protected] ~]# 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
}
Managed node View Python version
[Email protected] ~]# python-v
Python 2.4.3
Solve the problem:
1, Update python
2, install Python-simplejson on the node
Python version issue, cause ansible prompt error