i have 500+ target servers that have a ansible compatible python version 2.7
installed at different locations like shown below.
/usr/bin/python /opt/apps/xerto/tools/ansible/bin/python2.7
/opt/atlassian/tools/ansible/bin/python2.7
/opt/wsp/apps/ansible/python2.7/bin/python2.7
/opt/wsp/apps/tools/ansible/python2.7/bin/python2.7
/opt/docs/python/bin/python2.7
/home/admin/ansible/bin/python2.7
/opt/operations/Python-2.7.8/bin/python
/opt/ora/python/bin/python2.7
/opt/tomcat/tools/ansible/bin/python2.7
Everytime i have to set one the above python paths for ansible_python_interpreter
in the ansible host file depending on which target server my ansible is going to connect.
My intention is to make little or no changes on the target servers instead deal with this issue at the ansible end.
Is there a clever way to have ansible figure out where the desired python is?
Please suggest.
Ansible version: 2.7.1