Skip to content
DevOps AI ToolKit
All guides
AI for Ansible By James Joyner IV · · 8 min read Last reviewed Jul 2026

Ansible Error: 'The module ... was not found in configured module paths' — Cause, Fix, and Troubleshooting Guide

Quick answer

Fix Ansible's 'The module <name> was not found in configured module paths' error: missing collection, wrong FQCN, library path, or a typo in the module name.

  • #ansible
  • #troubleshooting
  • #automation
  • #collections
Free toolkit

Stuck on this Ansible error? Get the free incident triage checklist

A one-page PDF — the exact steps to isolate, fix, and verify a production error like this one. No spam, unsubscribe anytime.

Overview

When Ansible parses a task, it resolves the module name to an actual plugin file. If it cannot find one — because the module belongs to an uninstalled collection, the name is misspelled, or library/collections paths are wrong — the play fails at load time:

ERROR! couldn't resolve module/action 'community.docker.docker_container'. This often indicates a misspelling, missing collection, or incorrect module path.

The module 'docker_container' was not found in configured module paths.

This happens before any host is contacted; it is a controller-side resolution error.

Symptoms

  • The error names a specific module and fires during play parsing, not on a host.
  • A task that worked on an older box fails after a ansible-core upgrade that split modules into collections.
  • ansible-doc <module> also reports it cannot find the module.
ansible-playbook -i inventory.ini site.yml
ERROR! The module firewalld was not found in configured module paths

Common Root Causes

1. The collection is not installed

Since Ansible 2.10, most modules live in collections. If community.general, community.docker, ansible.posix, etc. is not installed, its modules resolve to nothing.

2. Wrong or missing FQCN

Short names only resolve if the collection is on the search path. Using the fully qualified collection name (FQCN) is the reliable form.

3. Typo in the module name

sytemd, docker_containers, copyfile — a single wrong character produces this error.

4. Custom module in a library/ path Ansible does not scan

A local module exists but library in ansible.cfg (or ANSIBLE_LIBRARY) does not point at it.

How to diagnose

List what collections are installed:

ansible-galaxy collection list | grep -iE 'docker|general|posix'

Ask Ansible to resolve the module directly:

ansible-doc community.docker.docker_container >/dev/null && echo "resolves" || echo "NOT found"

Check the effective module search paths:

ansible-config dump | grep -i module
ansible --version | grep -i "module search"

Fixes

Install the collection

ansible-galaxy collection install community.docker community.general ansible.posix

Pin it in requirements.yml so CI and teammates get the same versions:

# requirements.yml
collections:
  - name: community.docker
    version: ">=3.4.0"
  - name: community.general
ansible-galaxy collection install -r requirements.yml

Use the fully qualified module name

- name: Ensure container is running
  community.docker.docker_container:
    name: web
    image: nginx:1.27
    state: started

Point Ansible at a custom module directory

# ansible.cfg
[defaults]
library = ./library
ANSIBLE_LIBRARY=./library ansible-playbook -i inventory.ini site.yml

What to watch out for

  • After upgrading ansible-core, run ansible-galaxy collection list — bare module names that used to work may now need their collection installed.
  • Execution environments (AWX/EE images) must bundle the collections; installing on the control node is not enough inside a container.
  • FQCN in every task avoids ambiguity when two collections ship a same-named module.
Free download · 368-page PDF

Fixed it? Get 500 Ansible & DevOps AI prompts — free

500 battle-tested, copy-paste AI prompts engineered by a senior systems engineer — every one with fill-in placeholders and safety/back-out notes. Drop your email and it's yours.

  • 500 prompts: Linux · Kubernetes · Terraform · OpenStack · GitLab · Docker · Monitoring · Incident Response
  • Instant PDF download — yours free, forever
  • Plus one practical AI-workflow email a week (no spam)

Single opt-in · unsubscribe anytime · no spam.

Stuck on this? Start guided troubleshooting

Open an interactive diagnostic session with this error already loaded. Work a step-by-step plan, record what each check returns, land on a root cause, and export a clean incident summary — no account needed to start.

Did this fix your issue?

Solved it a different way?

Share the fix that worked for you — reviewed, then published to help the next engineer.

Free download · 368-page PDF

Get 500 Battle-Tested DevOps AI Prompts — Free

500 battle-tested, copy-paste AI prompts engineered by a senior systems engineer — every one with fill-in placeholders and safety/back-out notes. Drop your email and it's yours.

  • 500 prompts: Linux · Kubernetes · Terraform · OpenStack · GitLab · Docker · Monitoring · Incident Response
  • Instant PDF download — yours free, forever
  • Plus one practical AI-workflow email a week (no spam)

Single opt-in · unsubscribe anytime · no spam.