ansible-validator
Validate, lint, audit, or debug Ansible playbooks, roles, inventories, FQCN, tasks.
Generate, create, or scaffold Ansible playbooks, roles, tasks, handlers, inventory, vars.
$ npx -y skills add akin-ozer/cc-devops-skills --skill ansible-generator --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/ansible-generatorContext preview
The summary Claude sees to decide when to auto-load this skill.
Generate, create, or scaffold Ansible playbooks, roles, tasks, handlers, inventory, vars.
name: ansible-generator description: Generate, create, or scaffold Ansible playbooks, roles, tasks, handlers, inventory, vars.
Use this skill when the request is to generate or scaffold Ansible content, for example:
Do not use this skill as the primary workflow when the request is validation/debug-only (syntax errors, lint failures, Molecule/test failures). Use `ansible-validator` for those cases.
Run these stages in order. Do not skip a stage unless the `Validation Exceptions Matrix` explicitly allows it.
Determine one mode first:
| Mode | Typical user intent | Deliverable | | --- | --- | --- | | `full-generation` | "create/build/generate" a full playbook/role/inventory/project file set | Complete file(s), production-ready | | `snippet-only` | "quick snippet/example" without full file context | Focused task/play snippet | | `docs-only` | explanation, pattern comparison, or conceptual guidance only | Explanatory content, optional examples |
If details are missing, ask briefly. If the user does not provide them, proceed with safe defaults and state assumptions.
| Resource type | Required inputs | Safe defaults if missing | | --- | --- | --- | | Playbook | target hosts, privilege (`become`), OS family, objective | `hosts: all`, `become: false`, OS-agnostic modules | | Role | role name, primary service/package, supported OS | role name from task domain, Debian + RedHat vars | | Tasks file | operation scope, required vars, execution context | standalone reusable tasks with documented vars | | Inventory | environments, host groups, hostnames/IPs | `production`/`staging` groups with placeholders | | Project config | collections/roles dependencies, lint policy | minimal `ansible.cfg`, `requirements.yml`, `.ansible-lint` |
Before drafting content, extract the following from local references/templates.
Apply these generation standards:
1. Use FQCN module names (`ansible.builtin.*` first choice). 2. Keep tasks idempotent (`state`, `creates/removes`, `changed_when` when needed). 3. Use descriptive verb-first task names. 4. Use `true`/`false` booleans (not `yes`/`no`). 5. Add `no_log: true` for sensitive values. 6. Replace all placeholders before presenting output. 7. Prefer `ansible.builtin.dnf` for RHEL 8+/CentOS 8+ (legacy `yum` only for older systems).
Use the matrix below to keep validation deterministic and non-blocking.
| Scenario | Default behavior | Allowed fallback | What to report | | --- | --- | --- | --- | | `full-generation` | Run `ansible-validator` after generation and after each fix pass | If validator/tools are unavailable, run manual static checks (YAML shape, placeholder scan, FQCN/idempotency/security review) and provide exact deferred validation commands | Explicitly list which checks ran, which were skipped, and why | | `snippet-only` | Skip full validator by default; do inline sanity checks | Run full validator only if user asks or snippet is promoted to full file | State that validation was limited because output is snippet-only | | `docs-only` | No runtime validation | None needed | State that no executable artifact was generated | | Offline environment (no web/docs access) | Continue with local references and templates | Skip external doc lookups; prefer builtin-module implementations; provide notes for later external verification | State offline constraint and impacted checks/lookups |
A practical skill pack for DevOps work in Claude Code and Codex desktop. This repository ships 31 skills: 16 generators for scaffolding production-ready configs 14 validators for linting, security checks, and dry-run validation 1 debugger (k8s-debug) for
Repo: akin-ozer/cc-devops-skills
Validate, lint, audit, or debug Ansible playbooks, roles, inventories, FQCN, tasks.
Generate/create/scaffold azure-pipelines.yml, stages, jobs, steps, or reusable templates.
Validate, lint, audit, or review azure-pipelines.yml — syntax, security, best practices.
Create, generate, write, or scaffold bash/shell scripts (.sh), automation, or CLI tools.
Validate, lint, audit, or fix bash/shell/.sh scripts via ShellCheck.
Create, generate, or write Dockerfiles and multi-stage Docker images. Containerize apps.