skills/ansible/SKILL.md
Senior-level Ansible guidance for production automation. Use when designing, creating, running, reviewing, or debugging Ansible projects: ansible-core execution, playbooks, roles, collections, custom modules/plugins, inventories, variable flow, EEs, AWX/AAP, PAH, EDA, air-gap workflows, testing, upgrades, performance, secrets, and large-scale rollouts.
npx skillsauth add mgajewskik/opencode-config ansibleInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Production-first Ansible guidance for senior users. Optimize for correctness, idempotency, maintainability, security, scale, and minimal diffs. Skip beginner tutorials unless the user explicitly asks for them.
This skill is based on a bundled senior-level Ansible source corpus and is intentionally opinionated toward large-project, production-grade Ansible work.
Classify the request first, then load only the smallest useful reference.
ansible.cfg, collections, Git strategy -> read references/project-architecture.mdshell/command tradeoffs -> read references/playbook-and-role-patterns.mdhostvars, set_fact, set_stats, delegation, cross-play data flow -> read references/inventory-vars-and-data-flow.mdansible-builder, ansible-navigator, ansible-runner, AWX/AAP, job templates, mesh -> read references/runtime-and-platform.mdansible-core upgrades, porting risk, compatibility review, rollout strategy -> read references/upgrades-and-porting.mdserial, free, async, throttle, ansible-pull, scale tuning -> read references/performance-and-orchestration.mdno_log, privileged auditing, supply-chain hygiene -> read references/security-and-secrets.mdshell/command when a real module existsimport_* and include_* are not interchangeable.forks.changed is a control signal. False positives restart services; false negatives skip handlers.Ask a focused follow-up set when any of these are true:
High-value discovery questions:
ansible-navigator?Choose one primary mode and at most one secondary mode.
| Mode | Use when | Load |
|---|---|---|
| mechanics | explaining root mechanics, execution lifecycle, AnsiballZ, strategy behavior, idempotency model | references/core-mechanics.md |
| design | new repo, restructuring, layout, dependency boundaries, collection-first architecture | references/project-architecture.md |
| build | writing or modifying playbooks, roles, handlers, and task includes | references/playbook-and-role-patterns.md |
| extend | writing or reviewing custom modules, callbacks, filters, lookups, or collection-packaged extensibility | references/plugins-and-extensibility.md |
| data-flow | debugging vars, precedence, hostvars, delegation, workflow artifacts, fact cache behavior | references/inventory-vars-and-data-flow.md |
| runtime | execution environments, builder, navigator, AWX/AAP, mesh, job slicing | references/runtime-and-platform.md |
| ecosystem | AAP platform components, PAH, EDA, air-gap, regulated operations, alternatives/tradeoffs | references/aap-ecosystem-and-airgap.md |
| upgrade | ansible-core upgrades, porting-readiness, version pinning, compatibility fallout | references/upgrades-and-porting.md |
| validate | syntax, lint, check mode, idempotency, canary, Molecule, CI policy | references/testing-and-validation.md |
| debug | failures, transport, interpreter, temp paths, race conditions, handler order, task debugger | references/debugging-and-failure-modes.md |
| scale | slow runs, large inventories, forks, caching, strategies, async, pull model | references/performance-and-orchestration.md |
| secure | Vault, external secret lookup, no_log, auditability, signing, version pinning | references/security-and-secrets.md |
| review | code review, smell detection, refactor plan, risk ranking | references/review-and-refactor.md |
Common combinations:
design + validatebuild + validateextend + validatedata-flow + debugupgrade + validateruntime + scaleruntime + ecosystemsecure + reviewDefault response shape:
Verdict - one-line assessment or recommended directionWhy - the main mechanism or senior-level reasonRecommended pattern - concise design or code directionRisks / edge cases - what can still go wrongValidation - the smallest convincing check sequenceNext step - the smallest action to take nowMode-specific additions:
review
Verdict, Blockers, Risks, Evidence, Suggested fixes, Smallest next stepdebug
Likely failure layerSmallest next probevalidate
Required gatesCanary / idempotency expectationdesign
Proposed repo shapeNon-goalsshell or command if a maintained module can express the state.group_vars/ by default.Pass when all are true:
Fail when any are true:
shell/command is suggested without justification and change/failure controls| Scenario | Detection | Fallback | |---|---|---| | Runtime unclear | User did not say CLI vs AWX/AAP vs CI | Ask only for execution path and validation path | | Variable issue is ambiguous | Same key may exist in multiple scopes | Use inventory graph and precedence reasoning before suggesting code changes | | Performance complaint is vague | No timing data, just “slow” | Start with fact gathering, cache, and profile checks before tuning concurrency | | Security-sensitive request | Secrets or privileged tasks involved | Default to external lookup or encrypted-at-rest guidance and redact examples | | Broad refactor requested | Many roles/inventories touched | Propose phased rollout with validation checkpoints |
development
Guide technical communication for software developers. Covers email structure, team messaging etiquette, meeting agendas, and adapting messages for technical vs non-technical audiences. Use when drafting professional messages, preparing meeting communications, or improving written communication.
development
Senior-level Helm and Helm chart guidance for Kubernetes. Use when creating, reviewing, debugging, or operating Helm charts/releases: Chart.yaml, values.yaml, templates, dependencies, CRDs, hooks, RBAC, helm install/upgrade/rollback, OCI/provenance, Argo CD/Flux Helm workflows.
testing
Interview the user relentlessly about a plan or design until reaching shared understanding, resolving each branch of the decision tree. Use when user wants to stress-test a plan, get grilled on their design, or mentions "grill me".
testing
Create, update, review, triage, and adopt Architecture Decision Records (ADRs) using MADR-style Markdown templates and senior ADR practice. Use when the user mentions ADR, Architecture Decision Record, decision record, MADR, architectural decision, docs/decisions, supersede ADR, stale ADRs, ADR review, or wants to record a technical decision in a repository.