Raw module + no JSON needed for copy/file/template

Two new things on the devel branch of interest to people with EL 5
hosts, or anywhere else where Python isn't 2.5 yet.

(1)

The raw module, added by Adrià Casajús, has been merged in. This
allows direct SSH communication with hosts without using an Ansible
module, and is of course therefore reliant on the user's shell and so
forth.

This is primarily usable in the case where you have a RHEL5/CentOS 5
host and want to use Ansible with it. Before you can run a playbook
you could fix them up like so:

   ansible all -m raw -a "yum install python-simplejson"

It's also useful for talking to routers and load balancers or whatever
that don't have Python installed.

(2)

The template, copy, and file modules can all now work without any JSON
dependencies.

If you need to set up EPEL first to get python-simplejson, you can
also use the 'template' or 'copy' modules now first, because the file
module no longer requires any JSON. I think that's pretty awesome, as
we're now self bootstrapping for legacy hosts!

    ansible all -m copy -a "src=/wherever/epel.repo dest=/etc/yum.repos.d/epel"
    ansible all -m raw - a "yum install python-simplejson"

Docs section on this coming soon.

Generally any module that does not need to return simple json can be
made to not have a dependency on JSON, but it's WAY too useful to be
able to return complex data such that I don't intend to really port
any additional modules to work this way. This is primarily there as
instructions on how to get old hosts ready to use Ansible, and we'll
document it that way.

It’s not going to be reverted, however, you can easily use the raw module to run commands, which goes straight in through SSH without any module calls. This way you don’t need to use
copy to configure the repo either.

ansible -m raw -a “yum install http://path/to/python-simplejson.rpm

OK fair enough!

You can use /usr/bin/ansible with -m raw and that is basically it.

I’m able to run the raw module using Ansible ad-hoc commands however, when run the playbook with same commands it fails with error:
"invalid output was: Traceback (most recent call last):
File “/tmp/ansible-tmp-1418879078.47-138258829915016/setup”, line 187, in
import locale
ImportError: No module named locale "

Any idea what I might be missing…or how how should I write the playbook to reflect the same as I’m doing in ad-hoc command.

My ad-hoc command is: "sudo ansible locale1 -i data --private-key=server.pem -vvvv -u ubuntu -m script -a multivr.sh "

Where miltivr.sh is a small script in bash that removes the multiverse.list.
locale1 is a tag in my inventory file to tell ansible which hosts I need to run this command on.

Any help would be appreciated.