LOGBOOK

HELP

Quiz Entry - updated: 2026.10.30

How do you find the right module for a task and learn how to use it?

Browse the module index at docs.ansible.com, or use ansible-doc on the control node: ansible-doc -l lists installed modules, ansible-doc <module> shows its description, options (mandatory ones marked) and example snippets.

$ ansible-doc yum
> YUM    (.../ansible/modules/packaging/os/yum.py)
    Installs, upgrade, downgrades, removes, and lists packages and groups
    with the `yum' package manager. ...
OPTIONS (= is mandatory):
- allow_downgrade
    ... can make this module behave in a non-idempotent way ...
    [Default: no]
    type: bool

Ansible ships hundreds of modules, so you don't memorise them; you look them up. Both routes give the same content:

  • The online index groups modules by collection and topic (system modules for users and services, database modules, cloud, network...).
  • ansible-doc works offline and always matches the exact version installed, which matters because options change between releases. Its EXAMPLES section can be pasted into a playbook and adapted. ansible-doc -s <module> prints just a playbook snippet.

Read the option notes: here the documentation warns that allow_downgrade=True can break idempotency.

Go deeper:

From Quiz: ITIA / Ansible Inventory, Configuration and Playbooks | Updated: Oct 30, 2026