# Newbie question: Error message from ansible ping module

**URL:** <https://forum.ansible.com/t/newbie-question-error-message-from-ansible-ping-module/22801>\
**Category:** Ansible Project\
**Tags:** ubuntu\
**Created:** [October 16, 2016, 1:55pm UTC](https://forum.ansible.com/t/newbie-question-error-message-from-ansible-ping-module/22801 "2016-10-16T13:55:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Henrik\_Bach](https://avatars.discourse-cdn.com/v4/letter/h/74df32/32.png) [@Henrik\_Bach](https://forum.ansible.com/u/Henrik_Bach)\
**Post date:** [October 16, 2016, 1:55pm UTC](https://forum.ansible.com/t/newbie-question-error-message-from-ansible-ping-module/22801/1 "2016-10-16T13:55:01Z")

</div>

Hi,

I’m new to Ansible.

I’ve installed ansible on my ubuntu 16.04:

$ ansible --version  
ansible 2.0.0.2  
config file = /etc/ansible/ansible.cfg  
configured module search path = Default w/o overrides

When I try to test whether ansible is able to connect with my test node, I get this error:

$ ansible all -i hosts -m ping -u sad -vvvvvv  
Using /etc/ansible/ansible.cfg as config file  
Loaded callback minimal of type stdout, v2.0  
\<10.147.1.179\> ESTABLISH SSH CONNECTION FOR USER: sad  
\<10.147.1.179\> SSH: ansible.cfg set ssh\_args: (-o)(ControlMaster=auto)(-o)(ControlPersist=60s)  
\<10.147.1.179\> SSH: ansible\_password/ansible\_ssh\_pass not set: (-o)(KbdInteractiveAuthentication=no)(-o)(PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey)(-o)(PasswordAuthentication=no)  
\<10.147.1.179\> SSH: ANSIBLE\_REMOTE\_USER/remote\_user/ansible\_user/user/-u set: (-o)(User=sad)  
\<10.147.1.179\> SSH: ANSIBLE\_TIMEOUT/timeout set: (-o)(ConnectTimeout=10)  
\<10.147.1.179\> SSH: PlayContext set ssh\_common\_args: ()  
\<10.147.1.179\> SSH: PlayContext set ssh\_extra\_args: ()  
\<10.147.1.179\> SSH: found only ControlPersist; added ControlPath: (-o)(ControlPath=/home/sad/.ansible/cp/ansible-ssh-%h-%p-%r)  
\<10.147.1.179\> SSH: EXEC ssh -C -vvv -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=sad -o ConnectTimeout=10 -o ControlPath=/home/sad/.ansible/cp/ansible-ssh-%h-%p-%r -tt 10.147.1.179 ‘( umask 22 && mkdir -p “$( echo $HOME/.ansible/tmp/ansible-tmp-1476625987.55-130642926662092 )” && echo “$( echo $HOME/.ansible/tmp/ansible-tmp-1476625987.55-130642926662092 )” )’  
\<10.147.1.179\> PUT /tmp/tmpU6dK6I TO /home/sad/.ansible/tmp/ansible-tmp-1476625987.55-130642926662092/ping  
\<10.147.1.179\> SSH: ansible.cfg set ssh\_args: (-o)(ControlMaster=auto)(-o)(ControlPersist=60s)  
\<10.147.1.179\> SSH: ansible\_password/ansible\_ssh\_pass not set: (-o)(KbdInteractiveAuthentication=no)(-o)(PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey)(-o)(PasswordAuthentication=no)  
\<10.147.1.179\> SSH: ANSIBLE\_REMOTE\_USER/remote\_user/ansible\_user/user/-u set: (-o)(User=sad)  
\<10.147.1.179\> SSH: ANSIBLE\_TIMEOUT/timeout set: (-o)(ConnectTimeout=10)  
\<10.147.1.179\> SSH: PlayContext set ssh\_common\_args: ()  
\<10.147.1.179\> SSH: PlayContext set sftp\_extra\_args: ()  
\<10.147.1.179\> SSH: found only ControlPersist; added ControlPath: (-o)(ControlPath=/home/sad/.ansible/cp/ansible-ssh-%h-%p-%r)  
\<10.147.1.179\> SSH: EXEC sftp -b - -C -vvv -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=sad -o ConnectTimeout=10 -o ControlPath=/home/sad/.ansible/cp/ansible-ssh-%h-%p-%r ‘[10.147.1.179]’  
\<10.147.1.179\> ESTABLISH SSH CONNECTION FOR USER: sad  
\<10.147.1.179\> SSH: ansible.cfg set ssh\_args: (-o)(ControlMaster=auto)(-o)(ControlPersist=60s)  
\<10.147.1.179\> SSH: ansible\_password/ansible\_ssh\_pass not set: (-o)(KbdInteractiveAuthentication=no)(-o)(PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey)(-o)(PasswordAuthentication=no)  
\<10.147.1.179\> SSH: ANSIBLE\_REMOTE\_USER/remote\_user/ansible\_user/user/-u set: (-o)(User=sad)  
\<10.147.1.179\> SSH: ANSIBLE\_TIMEOUT/timeout set: (-o)(ConnectTimeout=10)  
\<10.147.1.179\> SSH: PlayContext set ssh\_common\_args: ()  
\<10.147.1.179\> SSH: PlayContext set ssh\_extra\_args: ()  
\<10.147.1.179\> SSH: found only ControlPersist; added ControlPath: (-o)(ControlPath=/home/sad/.ansible/cp/ansible-ssh-%h-%p-%r)  
\<10.147.1.179\> SSH: EXEC ssh -C -vvv -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=sad -o ConnectTimeout=10 -o ControlPath=/home/sad/.ansible/cp/ansible-ssh-%h-%p-%r -tt 10.147.1.179 ‘LANG=en\_US.UTF-8 LC\_ALL=en\_US.UTF-8 LC\_MESSAGES=en\_US.UTF-8 /usr/bin/python /home/sad/.ansible/tmp/ansible-tmp-1476625987.55-130642926662092/ping; rm -rf “/home/sad/.ansible/tmp/ansible-tmp-1476625987.55-130642926662092/” \> /dev/null 2\>&1’  
10.147.1.179 | FAILED! =\> {  
“changed”: false,  
“failed”: true,  
“invocation”: {  
“module\_name”: “ping”  
},  
“module\_stderr”: “OpenSSH\_7.2p2 Ubuntu-4ubuntu2.1, OpenSSL 1.0.2g 1 Mar 2016\r\ndebug1: Reading configuration data /etc/ssh/ssh\_config\r\ndebug1: /etc/ssh/ssh\_config line 19: Applying options for \*\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O\_NONBLOCK\r\ndebug2: mux\_client\_hello\_exchange: master version 4\r\ndebug3: mux\_client\_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux\_client\_request\_session: entering\r\ndebug3: mux\_client\_request\_alive: entering\r\ndebug3: mux\_client\_request\_alive: done pid = 12698\r\ndebug3: mux\_client\_request\_session: session request sent\r\ndebug1: mux\_client\_request\_session: master session id: 2\r\ndebug3: mux\_client\_read\_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\nShared connection to 10.147.1.179 closed.\r\n”,  
“module\_stdout”: “bash: /usr/bin/python: No such file or directory\r\n”,  
“msg”: “MODULE FAILURE”,  
“parsed”: false  
}

What am I doing wrong or what is missing?

/Henrik

---

<div class="post-metadata">

**Author:** ![Kai\_Stian\_Olstad](https://avatars.discourse-cdn.com/v4/letter/k/e19adc/32.png) [@Kai\_Stian\_Olstad](https://forum.ansible.com/u/Kai_Stian_Olstad)\
**Post date:** [October 17, 2016, 6:39pm UTC](https://forum.ansible.com/t/newbie-question-error-message-from-ansible-ping-module/22801/2 "2016-10-17T18:39:11Z")

</div>

> I've installed ansible on my ubuntu 16.04:
> 
> $ ansible --version  
> ansible 2.0.0.2  
> &nbsp;&nbsp;config file = /etc/ansible/ansible.cfg  
> &nbsp;&nbsp;configured module search path = Default w/o overrides
> 
> When I try to test whether ansible is able to connect with my test node, I  
> get this error:

I guess you test node is also Ubuntu 16.04?

> $ ansible all -i hosts -m ping -u sad -vvvvvv

[snip]

> &nbsp;&nbsp;&nbsp;&nbsp;"module\_stdout": "bash: /usr/bin/python: No such file or  
> directory\r\n",  
> &nbsp;&nbsp;&nbsp;&nbsp;"msg": "MODULE FAILURE",  
> &nbsp;&nbsp;&nbsp;&nbsp;"parsed": false  
> }
> 
> What am I doing wrong or what is missing?

The ping module need Python 2 on the node.  
Default Ubuntu 16.04 only install Python 3, install the package "python" on you test node and it should work.
