Error: ansible requires a json module, none found Error: ansible requires a json module, none found json json

Error: ansible requires a json module, none found


I think you need to install the python-simplejson module.

Try to run this command first and then your desired commands:

 ansible webservers -i inventory -m raw -a "sudo yum install -y python-simplejson"  -k  -u root -vvvv

I am supposing that its old Red Hat/CentOS system.


If you don't want or can't install the python-simplejson module on remote servers, you can simply request the raw output instead:

> ansible webservers -i inventory -m ping -m raw

Or like I did, added it to my ~/.bash_profile

alias ansible="ansible -m raw"# And then simply running:> ansible webservers -i inventory -m ping


in centos 5.* version no python-simple json available on repo to donwload and install. you can simple use below mentioned method.

make sure both the source and destination should be accessed password less and from source to destination also password less.

use ssh-keygen -t rsa to generate keyssh-copy-id user@host_ip

"--- - hosts: (ansible host) become: yes remote_user: root gather_facts: false tasks: - name: copying copying temps shell: ssh (source) && rsync -parv /root/temp/* root@(Destination):/root/temp/"