Ansible Playbook Doesn't run on RHEL 4.x

fatal: [172.19.1.239]: FAILED! => {“changed”: false, “failed”: true, “module_stderr”: “”, “module_stdout”: “Traceback (most recent call last):\r\n File "/root/.ansible/tmp/ansible-tmp-1471850606.58-237797342898160/setup", line 10, in ?\r\n import subprocess\r\nImportError: No module named subprocess\r\n”, “msg”: “MODULE FAILURE”, “parsed”: false}

4.x has python2.7 installed on it /usr/local/bin.

Could you please help a way forward

Thanks in advance,

Mona G

Ansible expect Python to be at /usr/bin/python if it's not you need to set ansible_python_interpreter.

https://docs.ansible.com/ansible/faq.html#how-do-i-handle-python-pathing-not-having-a-python-2-x-in-usr-bin-python-on-a-remote-machine

Verify that you have You should also use ansible_python_interpreter in your inventory for this server (, How do I handle python pathing not having a Python 2.X in /usr/bin/python on a remote machine?) Regards,