ansible-automation
Installation
SKILL.md
Ansible Automation
Build repeatable automation that is safe to rerun and clear about its target scope.
Workflow
- Inspect
ansible.cfg, dependency manifests, inventories, variable directories, playbooks, roles, CI, and repository conventions before editing. - Confirm the intended hosts, environment, connection method, privilege escalation, supported Ansible version, and collection versions.
- Prefer built-in module behavior over
commandorshell, use fully qualified collection names when ambiguity is possible, and keep roles cohesive. - Model desired state idempotently. Give tasks descriptive names, use handlers for service changes, and mark changed or failed behavior explicitly when modules cannot infer it.
- Keep defaults overridable, required inputs validated, and variable ownership clear. Account for Ansible variable precedence instead of relying on accidental overrides.
- Run syntax checks and the project's lint and tests. Use check and diff modes where supported, but do not treat them as proof when modules lack complete support.
- Test idempotency and important failure paths in an isolated environment with the repository's existing Molecule or integration workflow.
- For rollout, preview the exact inventory and host limit, start with a canary or small serial batch, verify handlers and health, then expand only after approval.