error message with adhoc command from the command line

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

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

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

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