sanity

Runs ansible-test sanity checks on Ansible collections with change detection.

8|7|Updated Feb 14, 2023
One-click install
npx skills add https://github.com/eclipse-slm/slm --skill sanity-eclipse-slm
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: sanity
Source: https://github.com/eclipse-slm/slm/tree/main/.agents/skills/sanity
Command: npx skills add https://github.com/eclipse-slm/slm --skill sanity-eclipse-slm

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires ansible-core.

What problem does it solve? Running full ansible-test sanity suites on large Ansible collections is slow, often taking 10+ minutes, which discourages frequent validation during development. This Skill detects changed plugin and module files and targets sanity tests only where needed, giving fast feedback before commits and releases. ## Core Features & Use Cases - Smart Mode: Detects files changed since the last stable tag and runs sanity tests only on those files, typically finishing in under a minute. - Full and Changed-Only Modes: Run the complete sanity suite for releases, or test changes against a custom git ref for backports. - Multi-Version Release Testing: Validates modules against both the minimum ansible-core version from meta/runtime.yml and the latest compatible release. - Use Case: Before committing changes to two modules in the amazon.aws collection, run smart mode to execute validate-modules, pylint, import, compile, and yamllint tests on just those files in under a minute instead of testing all 389 modules. ## Quick Start Ask the assistant to run Ansible sanity tests in smart mode on the current collection to validate only the changed modules before committing.

Frequently Asked Questions about sanity

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run ansible-test sanity only on changed files?▼

Use git diff against the last stable tag to list changed files under plugins/, then pass those paths directly to ansible-test sanity. This smart mode typically finishes in under a minute compared to 10+ minutes for the full suite.

How to test an Ansible collection before a release?▼

Run the full ansible-test sanity suite on the entire collection, then validate against both the minimum ansible-core version from meta/runtime.yml and the latest compatible release in separate virtual environments.

Which Python versions work with ansible-core for sanity tests?▼

ansible-core 2.17 through 2.19 support Python 3.10-3.12, while 2.20 and 2.21 require Python 3.11-3.13. Check the ansible-core support matrix and create a virtual environment with a compatible interpreter.

Why does ansible-test fail with 'Not an Ansible collection'?▼

This error occurs when the working directory lacks a proper collection structure. Navigate to the collection root following the ansible_collections/namespace/collection layout and confirm a galaxy.yml file exists.

When should I use full sanity mode instead of smart mode?▼

Use full mode before major releases or on the main branch when comprehensive coverage matters, since it runs all tests on all files. Smart mode is recommended for daily development and pull requests where only changed files need validation.