ansible-test
Run ansible-test sanity on modules and plugins.
Mit Codex oder Claude installieren Kopieren Sie diesen Prompt, fügen Sie ihn in Codex, Claude oder einen anderen Assistant ein und lassen Sie die Skill-Seite prüfen und installieren.
Menü
Run ansible-test sanity on modules and plugins.
Mit Codex oder Claude installieren Kopieren Sie diesen Prompt, fügen Sie ihn in Codex, Claude oder einen anderen Assistant ein und lassen Sie die Skill-Seite prüfen und installieren.
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