# error message with adhoc command from the command line

**URL:** <https://forum.ansible.com/t/error-message-with-adhoc-command-from-the-command-line/24596>\
**Category:** Ansible Project\
**Tags:** ubuntu\
**Created:** [May 30, 2017, 7:32am UTC](https://forum.ansible.com/t/error-message-with-adhoc-command-from-the-command-line/24596 "2017-05-30T07:32:43Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![DOkuwa](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/dokuwa/32/1471_2.png) [@DOkuwa](https://forum.ansible.com/u/DOkuwa)\
**Post date:** [May 30, 2017, 7:32am UTC](https://forum.ansible.com/t/error-message-with-adhoc-command-from-the-command-line/24596/1 "2017-05-30T07:32:43Z")

</div>

kuwa@ubuntu:/etc/ansible$ ansible all -i hosts -u dokuwa1 --ask-pass -m yum -a “name=httpd state=present” --become-user=root --ask-become-pass  
SSH password:  
SUDO password[defaults to SSH password]:  
192.168.85.129 | FAILED! =\> {  
“changed”: false,  
“failed”: true,  
“msg”: “python2 bindings for rpm are needed for this module. python2 yum module is needed for this module”  
Thanks

---

<div class="post-metadata">

**Author:** ![B\_Holmes](https://avatars.discourse-cdn.com/v4/letter/b/a8b319/32.png) [@B\_Holmes](https://forum.ansible.com/u/B_Holmes)\
**Post date:** [July 6, 2017, 8:09pm UTC](https://forum.ansible.com/t/error-message-with-adhoc-command-from-the-command-line/24596/2 "2017-07-06T20:09:29Z")

</div>

I’ve hit this problem too, ever find a solution?

---

<div class="post-metadata">

**Author:** ![DOkuwa](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/dokuwa/32/1471_2.png) [@DOkuwa](https://forum.ansible.com/u/DOkuwa)\
**Post date:** [July 7, 2017, 7:43am UTC](https://forum.ansible.com/t/error-message-with-adhoc-command-from-the-command-line/24596/3 "2017-07-07T07:43:55Z")

</div>

hello

you need to use yum to install the python libraries  
please do a rpm -qa | grep python if you are using red hat

thanks

Daley

---

<div class="post-metadata">

**Author:** ![B\_Holmes](https://avatars.discourse-cdn.com/v4/letter/b/a8b319/32.png) [@B\_Holmes](https://forum.ansible.com/u/B_Holmes)\
**Post date:** [July 17, 2017, 7:12pm UTC](https://forum.ansible.com/t/error-message-with-adhoc-command-from-the-command-line/24596/4 "2017-07-17T19:12:55Z")

</div>

Hi Daley,

> rpm -qa | grep python

just gives the installed packages with python in the name. Any idea which is missing to fix this error? python2 yum module is installed.

Many thanks
