Have a look at ansible_python_interpreter:

http://docs.ansible.com/ansible/intro_inventory.html#list-of-behavioral-inventory-parameters
On 14 Jul 2016 5:50 p.m., "niraj pandey" <[email protected]> wrote:

> Hi,
>
> I have just started to learn Ansible and facing some issue while executing
> a simple ping command:
>
> ansible webserver -m ping
>
> wllog | FAILED! => {
>     "changed": false,
>     "failed": true,
>     "module_stderr": "",
>     "module_stdout": "Traceback (most recent call last):\r\n  File
> \"/home/niraj/.ansible/tmp/ansible-tmp-1468471044.71-226020658252160/ping.py\",
> line 120, in ?\r\n    exitcode = invoke_module(module, zipped_mod,
> ZIPLOADER_PARAMS)\r\n  File
> \"/home/niraj/.ansible/tmp/ansible-tmp-1468471044.71-226020658252160/ping.py\",
> line 29, in invoke_module\r\n    (stdout, stderr) =
> p.communicate(json_params)\r\n  File
> \"/usr/lib64/python2.4/subprocess.py\", line 1064, in communicate\r\n
>  bytes_written = os.write(self.stdin.fileno(), input[:512])\r\nOSError:
> [Errno 32] Broken pipe\r\n",
>     "msg": "MODULE FAILURE",
>     "parsed": false
> }
>
> Little bit googling hints that I need to install simplejason module on the
> client machine.
>
> Is there any way that ansible use the python from alternate location on
> client machine to pass information back instead of it's default location
> (/usr/bin/python).
>
> As I have a python installed centrally and accessible from all the hosts.
> This python carrying most of the modules. So I want client should use that
> python to pass information back to ansible.
>
> Thanks
> ~Niraj
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/cb8574ab-345f-46d2-986e-2ac2c1353776%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/cb8574ab-345f-46d2-986e-2ac2c1353776%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAKtKohTYx%2BpnZOrn_vnOcOz-ZcNFpSbGtrgogMgFBbg6r8y_Dg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to