# The module hardware was not found in configured module paths

**URL:** <https://forum.ansible.com/t/the-module-hardware-was-not-found-in-configured-module-paths/40185>\
**Category:** Get Help\
**Created:** [February 11, 2025, 4:29pm UTC](https://forum.ansible.com/t/the-module-hardware-was-not-found-in-configured-module-paths/40185 "2025-02-11T16:29:48Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![arthurramsey19](https://avatars.discourse-cdn.com/v4/letter/a/b19c9b/32.png) [@arthurramsey19](https://forum.ansible.com/u/arthurramsey19)\
**Post date:** [February 11, 2025, 4:29pm UTC](https://forum.ansible.com/t/the-module-hardware-was-not-found-in-configured-module-paths/40185/1 "2025-02-11T16:29:48Z")

</div>

I’m using Alpine Linux 3.20.3 with Python 3.12.6 built from source. Ansible versions are ansible==9.2.0 ansible-core==2.16.3. This is my ansible.cfg: [[defaults]ansible\_managed = Ansible Managedcommand\_warnings = false - Pastebin.com](https://pastebin.com/xijLzu7R). I can see that I have the module files: [ls -lah /opt/python/lib/python3.12/site-packages/ansible/module\_utils/facts/hard - Pastebin.com](https://pastebin.com/h2W767T9). It works if I remove the facts\_modules = hardware. I’m managing a large number of hosts via SSH so I’m trying to optimize the configuration.

Thanks,  
Arthur

---

<div class="post-metadata">

**Author:** ![arthurramsey19](https://avatars.discourse-cdn.com/v4/letter/a/b19c9b/32.png) [@arthurramsey19](https://forum.ansible.com/u/arthurramsey19)\
**Post date:** [February 11, 2025, 4:30pm UTC](https://forum.ansible.com/t/the-module-hardware-was-not-found-in-configured-module-paths/40185/2 "2025-02-11T16:30:43Z")

</div>

You should be able to reproduce with this Dockerfile: [ARG TARGETARCH=amd64FROM alpine:3.20.3RUN apk add -U cmake curl file gcc g - Pastebin.com](https://pastebin.com/wHPVnRpa).

---

<div class="post-metadata">

**Author:** ![sivel](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/sivel/32/1198_2.png) [@sivel](https://forum.ansible.com/u/sivel)\
**Post date:** [February 11, 2025, 4:55pm UTC](https://forum.ansible.com/t/the-module-hardware-was-not-found-in-configured-module-paths/40185/3 "2025-02-11T16:55:09Z")

</div>

There is no facts module called `hardware`. I assume you are attempting to instruct ansible to only gather the `hardware` subset from `setup`/`gather_facts`?

In which case you cannot modify that via the `ansible.cfg` file, it must be provided within the playbook, either as `gather_subset` at the play level, or on an explicit fact gathering task.

---

<div class="post-metadata">

**Author:** ![arthurramsey19](https://avatars.discourse-cdn.com/v4/letter/a/b19c9b/32.png) [@arthurramsey19](https://forum.ansible.com/u/arthurramsey19)\
**Post date:** [February 11, 2025, 8:22pm UTC](https://forum.ansible.com/t/the-module-hardware-was-not-found-in-configured-module-paths/40185/4 "2025-02-11T20:22:51Z")

</div>

Thanks for the help @sivel

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/ansible/original/1X/1882d9a01da5d8996a862359b0913cc568a39b84.svg) [@system](https://forum.ansible.com/u/system)\
**Post date:** [March 13, 2025, 8:23pm UTC](https://forum.ansible.com/t/the-module-hardware-was-not-found-in-configured-module-paths/40185/5 "2025-03-13T20:23:06Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
