ansible-test
Run ansible-test sanity on modules and plugins.
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Menu
Run ansible-test sanity on modules and plugins.
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Run a role's Molecule scenario. Requires explicit authorization.
Lint roles and playbooks with ansible-lint.
Format Python code with black.
Manage changelog fragments and releases.
Build the collection tarball.
Install the project's pinned Python version.
| name | ansible-test |
| description | Run ansible-test sanity on modules and plugins. |
Catches DOCUMENTATION/RETURN/EXAMPLES drift, argspec mismatches, and import errors. It is a
required local check; the current GitHub Actions workflow does not run it.
Quick checks from the primary checkout, before running sanity:
source venv/bin/activate
git diff --check
python -m compileall -q plugins
Sanity only runs from a real checkout of the collection at
ansible_collections/{{ namespace }}/{{ name }}/ (from galaxy.yml):
venv/ansible_collections/{{ namespace }}/{{ name }}.Create it once, if git worktree list / ls doesn't show it, as a detached worktree — it must
be detached since the branch is checked out in the primary tree:
git worktree add --detach venv/ansible_collections/{{ namespace }}/{{ name }}
Sync your edits in (always --delete, so removed/renamed files don't linger), then run from
inside the checkout:
rsync -a --delete plugins/ venv/ansible_collections/{{ namespace }}/{{ name }}/plugins/
cd venv/ansible_collections/{{ namespace }}/{{ name }}
ansible-test sanity --python "$(cat .python-version)" plugins/modules/{{ file }}.py
--test validate-modules for just doc/argspec checks.0.virtualenv skill