# Enable module in Ansible

**URL:** <https://forum.ansible.com/t/enable-module-in-ansible/38647>\
**Category:** Ansible Project\
**Tags:** rhel\
**Created:** [January 11, 2024, 2:41pm UTC](https://forum.ansible.com/t/enable-module-in-ansible/38647 "2024-01-11T14:41:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![harry\_devine](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/harry_devine/32/5293_2.png) [@harry\_devine](https://forum.ansible.com/u/harry_devine)\
**Post date:** [January 11, 2024, 2:41pm UTC](https://forum.ansible.com/t/enable-module-in-ansible/38647/1 "2024-01-11T14:41:30Z")

</div>

I am working on a role to install Apache Guacamole. One of the dependencies that has to be installed is libssh2-devel, but that’s not available on RHEL 8. Google is telling me that if I install the virt-devel OS module via ‘dnf module enable virt-devel’,that will allow libssh2-devel to be installed.

However, in my playbook in the role, no matter what I try, I cannot get this module to be enabled. If I do this:

- name: Enable virt-devel module  
ansible.builtin.dnf:  
name: ‘@virt-devel’  
state: present

I get: “virt-devel Problems in request: broken groups or modules: virt-devel”.

If I change the code to use the command module:

- name: Enable virt-devel module  
ansible.builtin.command: /bin/dnf enable module virt-devel

nothing happens in my playbook. It doesn’t fail or succeed on that play, it simply just hangs there. So I went to the target host and ran that command manually, then enabled debug in my playbook. When I run it again, it gets past that play with:

Updating Subscription Management repositories.  
Last metadata expiration check: 0:56:53 ago on Thu 11 Jan 2024 08:41:00 AM EST.  
Dependencies resolved.  
Nothing to do.  
Complete!

Any ideas on why this could be happening?

Thanks,  
Harry

---

<div class="post-metadata">

**Author:** ![dnmvisser](https://avatars.discourse-cdn.com/v4/letter/d/8e8cbc/32.png) [@dnmvisser](https://forum.ansible.com/u/dnmvisser)\
**Post date:** [January 11, 2024, 3:27pm UTC](https://forum.ansible.com/t/enable-module-in-ansible/38647/2 "2024-01-11T15:27:15Z")

</div>

I don’t know, but this sounds more like a RHEL issue than an ansible issue…

---

<div class="post-metadata">

**Author:** ![harry\_devine](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/harry_devine/32/5293_2.png) [@harry\_devine](https://forum.ansible.com/u/harry_devine)\
**Post date:** [January 11, 2024, 7:23pm UTC](https://forum.ansible.com/t/enable-module-in-ansible/38647/3 "2024-01-11T19:23:14Z")

</div>

I used the command module and that seems to have let it get installed.

Thanks,  
Harry
