# Raw module invoking /usr/bin/python

**URL:** <https://forum.ansible.com/t/raw-module-invoking-usr-bin-python/28638>\
**Category:** Ansible Project\
**Tags:** ubuntu, aws\
**Created:** [September 24, 2018, 6:46pm UTC](https://forum.ansible.com/t/raw-module-invoking-usr-bin-python/28638 "2018-09-24T18:46:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dylan\_Martin3](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/dylan_martin3/32/8574_2.png) [@Dylan\_Martin3](https://forum.ansible.com/u/Dylan_Martin3)\
**Post date:** [September 24, 2018, 6:46pm UTC](https://forum.ansible.com/t/raw-module-invoking-usr-bin-python/28638/1 "2018-09-24T18:46:51Z")

</div>

I assume I broke a config somewhere because this makes no sense:

$ ansible -vvv ‘\*’ -i hosts.isp-east-stage -M raw -a ‘whoami’ -u ubuntu -l X.X.X.X

ansible 2.5.1  
config file = /home/dmartin/.ansible.cfg  
configured module search path = [u’/home/dmartin/.ansible/plugins/modules’, u’/usr/share/ansible/plugins/modules’]  
ansible python module location = /usr/lib/python2.7/dist-packages/ansible  
executable location = /usr/bin/ansible  
python version = 2.7.15rc1 (default, Apr 15 2018, 21:51:34) [GCC 7.3.0]  
Using /home/dmartin/.ansible.cfg as config file  
Parsed /home/dmartin/kafka-norancher/hosts.isp-east-stage inventory source with ini plugin  
META: ran handlers  
Using module file /usr/lib/python2.7/dist-packages/ansible/modules/commands/command.py  
\<X.X.X.X\> ESTABLISH SSH CONNECTION FOR USER: ubuntu  
\<X.X.X.X\> SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=ubuntu -o ConnectTimeout=10 -o ControlPath=/home/dmartin/.ansible/cp/5a5de34988 X.X.X.X ‘/bin/sh -c ‘"’"’/usr/bin/python && sleep 0’“'”‘’  
\<X.X.X.X\> (127, ‘’, ‘/bin/sh: 1: /usr/bin/python: not found\n’)  
X.X.X.X | FAILED! =\> {  
“changed”: false,  
“module\_stderr”: “/bin/sh: 1: /usr/bin/python: not found\n”,  
“module\_stdout”: “”,  
“msg”: “MODULE FAILURE”,  
“rc”: 127  
}

Any idea what’s going on?

Oh, I’m trying to install python on some ubuntu instances in AWS.

Thanks!

-Dylan

---

<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:** [September 24, 2018, 7:04pm UTC](https://forum.ansible.com/t/raw-module-invoking-usr-bin-python/28638/2 "2018-09-24T19:04:27Z")

</div>

> I assume I broke a config somewhere because this makes no sense:
> 
> $ ansible -vvv '\*' -i hosts.isp-east-stage -M raw -a 'whoami' -u ubuntu -l  
> X.X.X.X

You need to use lower case -m, uppercase -M is module path.

> ansible 2.5.1  
> &nbsp;&nbsp;config file = /home/dmartin/.ansible.cfg  
> &nbsp;&nbsp;configured module search path =  
> [u'/home/dmartin/.ansible/plugins/modules',  
> u'/usr/share/ansible/plugins/modules']  
> &nbsp;&nbsp;ansible python module location = /usr/lib/python2.7/dist-packages/ansible  
> &nbsp;&nbsp;executable location = /usr/bin/ansible  
> &nbsp;&nbsp;python version = 2.7.15rc1 (default, Apr 15 2018, 21:51:34) [GCC 7.3.0]  
> Using /home/dmartin/.ansible.cfg as config file  
> Parsed /home/dmartin/kafka-norancher/hosts.isp-east-stage inventory source  
> with ini plugin  
> META: ran handlers  
> Using module file  
> /usr/lib/python2.7/dist-packages/ansible/modules/commands/command.py  
> \<X.X.X.X\> ESTABLISH SSH CONNECTION FOR USER: ubuntu  
> \<X.X.X.X\> SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o  
> StrictHostKeyChecking=no -o KbdInteractiveAuthentication=no -o  
> PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey  
> -o PasswordAuthentication=no -o User=ubuntu -o ConnectTimeout=10 -o  
> ControlPath=/home/dmartin/.ansible/cp/5a5de34988 X.X.X.X '/bin/sh -c  
> '"'"'/usr/bin/python && sleep 0'"'"''  
> \<X.X.X.X\> (127, '', '/bin/sh: 1: /usr/bin/python: not found\n')  
> X.X.X.X | FAILED! =\> {  
> &nbsp;&nbsp;&nbsp;&nbsp;"changed": false,  
> &nbsp;&nbsp;&nbsp;&nbsp;"module\_stderr": "/bin/sh: 1: /usr/bin/python: not found\n",  
> &nbsp;&nbsp;&nbsp;&nbsp;"module\_stdout": "",  
> &nbsp;&nbsp;&nbsp;&nbsp;"msg": "MODULE FAILURE",  
> &nbsp;&nbsp;&nbsp;&nbsp;"rc": 127  
> }
> 
> Any idea what's going on?

Since the default module is command this make sense.
