Read the Docs with ansible-doc
Discover module options from the CLI.
Read the Docs with ansible-doc is a free Ansible Academy lesson on CoddyKit — lesson 4 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the Ansible Academy learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.
Docs Live in Your Terminal
The ansible-doc command shows full module documentation right in your shell, so you never have to leave the terminal to look things up.
Look Up One Module
Pass a module name to read its docs: every option, its type, and whether it is required. This is the fastest way to learn a module.
ansible-doc ansible.builtin.copyRead the Options Section
The output lists each option with a description, default value, and choices. This tells you exactly which keys a module accepts.
Jump Straight to Examples
Add -s to print a ready-to-copy snippet of the module's arguments. It is a perfect starting point for a new task.
ansible-doc -s ansible.builtin.systemdList Every Module
Run with -l to list all installed modules with one-line summaries. Pipe it through grep to find what you need.
ansible-doc -lSearch by Keyword
Not sure of the name? List modules and filter by topic. Searching for service quickly surfaces the relevant modules.
ansible-doc -l | grep serviceDocs Match Your Version
Because ansible-doc reads the modules installed locally, the docs always match your exact version. No risk of stale online pages.
See Return Values
The docs also describe what a module returns, like changed or stdout. That helps when you register results to use later.
Browse Plugins Too
Use -t to read docs for other plugin types, not just modules. For example, look up a lookup or filter plugin the same way.
ansible-doc -t lookup fileFind Module Metadata
The doc header shows the module's collection and short purpose, so you know its fully qualified name before you write a task.
Make It a Habit
Before guessing an argument, check ansible-doc first. A ten-second lookup saves a failed run and a confusing error message.
Quick Check
You want a quick copy-paste snippet of a module's arguments, not the full manual.
Recap
ansible-doc brings version-matched docs to your terminal: look up a module, use -s for a snippet, and -l to list and search. 📚
Frequently asked questions
Is the “Read the Docs with ansible-doc” lesson free?
Yes — the full text of “Read the Docs with ansible-doc” is free to read here on the web, and the Ansible Academy course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the Ansible Academy course, upgrade to CoddyKit PRO.
What will I learn in “Read the Docs with ansible-doc”?
Discover module options from the CLI. You practise Ansible Academy with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.
Do I need any experience to start Ansible Academy?
No prior experience is required. Ansible Academy on CoddyKit is structured for beginners through advanced learners; this is — lesson 4 of 4, so you can start here or from the beginning and move at your own pace.
How long does the “Read the Docs with ansible-doc” lesson take?
Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.
Can I write and run code in this Ansible Academy lesson?
Yes. Every Ansible Academy lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.
All lessons in this course
- What a Module Actually Is
- Install Packages with the package Module
- Manage Services with systemd
- Read the Docs with ansible-doc