Need some help

60 views
Skip to first unread message

niraj pandey

unread,
Jul 14, 2016, 12:50:57 PM7/14/16
to Ansible Project
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

Kai Stian Olstad

unread,
Jul 14, 2016, 3:19:20 PM7/14/16
to ansible...@googlegroups.com
On 14. juli 2016 06:46, niraj pandey wrote:
> 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).

Check out ansible_python_interpreter

--
Kai Stian Olstad

Will McDonald

unread,
Jul 14, 2016, 4:20:58 PM7/14/16
to ansible...@googlegroups.com

Have a look at ansible_python_interpreter:

http://docs.ansible.com/ansible/intro_inventory.html#list-of-behavioral-inventory-parameters

--
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 ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/cb8574ab-345f-46d2-986e-2ac2c1353776%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

niraj pandey

unread,
Jul 18, 2016, 9:26:16 AM7/18/16
to Ansible Project
Thanks ,

Is this applicable on RHEL5 machines as well ?

Thanks
Niraj
Reply all
Reply to author
Forward
0 new messages