一、執行ansible命令的時候客戶端rhel56-192.168.209.133 出現如下錯誤:python
[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!
二、查看該客戶端的python版本:json
[root@localhost ~]# python -V Python 2.4.3
三、錯誤緣由:python版本太低bash
四、解決辦法,二選一:oracle
1)升級客戶端的python版本至python2.5.x及以上ssh
2)客戶端上安裝python-simplejsonide
附官方說明:ui
託管節點要求:ip
一般咱們使用 ssh 與託管節點通訊,默認使用 sftp.若是 sftp 不可用,可在 ansible.cfg 配置文件中配置成 scp 的方式. 在託管節點上也須要安裝 Python 2.4 或以上的版本.若是版本低於 Python 2.5 ,還須要額外安裝一個模塊:it
● python-simplejsonclass
● 沒安裝python-simplejson,也可使用Ansible的」raw」模塊和script模塊,所以從技術上講,你能夠經過Ansible的」raw」模塊安裝python-simplejson,以後就可使用Ansible的全部功能了.