Using ansible and getting "No module named simplejson", here's where to find it.

If you get this message when running Ansible, this means you are using a version of Python less than 2.6 and need to provide JSON (either on your control machine or remote machines) support.

To fix this, install the python-simplejson modle (this is the name of the package at least in Fedora, Red Hat Enterprise Linux, or CentOS). If using RHEL or CentOS, a good place to get this is from Extras Packages for Enterprise Linux (EPEL). This is not needed on any machines already running Python 2.6.

EL 6 already has Python 2.6, so you’ll most likely encounter this just on EL5 and earlier.

See also: http://fedoraproject.org/wiki/EPEL

–Michael

(This email is mostly just to feed Google as I noticed a few people searching for it)

I searched for it too, and found myself on this page.

It would be nice if the error output made it clear the remote machine failed, as I was a bit confused after reading http://ansible.github.com/gettingstarted.html and confirming that I did in fact have python-simplejson installed… on the overlord machine. I’ll reread gettingstarted.html, and see if this is just PEBKAC, or if it can be written clearer.

I searched for it too, and found myself on this page.

It would be nice if the error output made it clear the remote machine failed, as I was a bit confused after reading http://ansible.github.com/gettingstarted.html and confirming that I did in fact have python-simplejson installed… on the overlord machine. I’ll reread gettingstarted.html, and see if this is just PEBKAC, or if it can be written clearer.

You are probably correct it should print that something is a remote traceback where folks don’t realize that, after mentioning the remote hostname, that message is coming from that host. You do get the traceback though.

If only to reduce the probability of getting that question, it would be a good thing.

–Michael