"msg": "python2 bindings for rpm are needed for this module. python2 yum module is needed for this module"


When I execute an comman to install httpd via yum to some controlled agent, it failed and poping out with the errors as below:

[root@localhost ansible]# ansible lab -m yum -a "name=bwm-ng state=present"
192.168.139.143 | FAILED! => {
"changed": false,
"msg": "python2 bindings for rpm are needed for this module. python2 yum module is needed for this module"
}
192.168.139.144 | FAILED! => {
"changed": false,
"msg": "python2 bindings for rpm are needed for this module. python2 yum module is needed for this module"
}
[root@localhost ansible]#

Not sure if someone met this issue before? I am new to Ansible, forgive the entry level questions.

Thanks
Paul

1 reply

Userlevel 4
Paul, Cumulus Linux is Debian based this means you'll need to use the apt module ( http://docs.ansible.com/ansible/latest/apt_module.html ) to install software instead of the yum module. Yum is used for RHEL based linux versions.

- name: Add the Jessie Supplemental Repo
apt_repository:
repo: deb http://repo3.cumulusnetworks.com/repo Jessie-supplemental upstream
state: present
filename: 'jessie_supplemental'
- name: Install "bwm-ng" package
apt:
name: bwm-ng
update_cache: yes

Reply