Install requirements

Just a heads up for anyone going down this path. You might want to add the following action. In library (e.g. in my case I’m working in /opt/ansible, so /opt/ansible/library), run:

for f in grep -ri "/usr/bin/env python" * | cut -d":" -f1; do sed -i ‘s//usr/bin/env python//usr/bin/env python26/g’ $f; done

before running make rpm. Otherwise you can do this after the fact in /usr/share/ansible

-Rawiri

Don't do this. We have a much better answer already.

Just set ansible_python_interpreter as a group or host variable and it
will override things at runtime. You can actually set
ansible_foo_interpreter for any interpreter named foo, by the way, and
it just works like magic (thanks to jkleint, IIRC).