Now using /usr/bin/env python vs /usr/bin/python to work better with virtualenv, etc

I received quite a few requests for this.

For those looking, it’s in place now in the latest git source.

–Michael

Would it be possible to define the python binary in a playbook?
“env python” is perfect as long as the binary is named “python”.
However, during my test on a mips-host (Tomato router), i got an error since the binary is named python2.6

It would be super if this could be configured easily…

I add the result Daniel Hozac gave me: use ansible_python_interpreter

Would it be possible to define the python binary in a playbook?
"env python" is perfect as long as the binary is named "python".
However, during my test on a mips-host (Tomato router), i got an error
since the binary is named python2.6

It would be super if this could be configured easily...

For example, in your inventory file:

        $ cat hosts
        your.tomato.router ansible_python_interpreter=/some/path/python2.6/bin/python

I learned that recently and it's saved my bacon :wink:

        -JP