ansible-designer
AI-assisted Ansible authoring toolkit. Scaffolds, reviews, and updates Ansible projects with production-quality output following official ansible-core 2.15+ conventions.
Available Commands
All commands are top-level regardless of install path.
Playbook Commands
| Command |
Description |
/new-playbook |
Create a new playbook (site, component, or AWX-ready) |
/review-playbook |
Review an existing playbook — severity report, no file modification |
/update-playbook |
Update a playbook — shows diff, requires confirmation |
Role Commands
| Command |
Description |
/new-role |
Scaffold a complete role — asks about multi-OS support |
/review-role |
Review a role — severity report, no file modification |
/update-role |
Update a role — shows diff, requires confirmation |
Collection Commands
| Command |
Description |
/new-collection |
Scaffold a new collection with galaxy.yml, plugins, roles structure |
/review-collection |
Review a collection — severity report, no file modification |
/update-collection |
Update a collection — shows diff, requires confirmation |
ansible.cfg Commands
| Command |
Description |
/new-conf |
Generate an annotated ansible.cfg for dev, CI, or AWX |
/review-conf |
Review an ansible.cfg — severity report, no file modification |
/update-conf |
Update ansible.cfg — shows diff, requires confirmation |
Global Rules
Every sub-command enforces these rules without exception:
Discovery first — At command start, read in order: CLAUDE.md → ansible.cfg → README.md → filesystem scan. Build internal context (roles, collections, paths, namespace). Skip if user already provided all required parameters inline. See references/discovery.md.
Never overwrite silently — Before writing any file, show a summary (new files) or unified diff (modifications). Wait for explicit user confirmation (yes / y). Only write after confirmation.
FQCN mandatory — Every module reference uses the Fully Qualified Collection Name. ansible.builtin.copy, never copy. ansible.builtin.service, never service. See references/best_practices.md.
no_log: true on secrets — Every task handling passwords, tokens, API keys, vault variables, or credentials must include no_log: true. See references/security_vault.md.
Tags on every task — Minimum: component name + action category (install, configure, service, validate, security, cleanup). No task may be untagged.
review never modifies — review-* commands produce a structured severity report (CRITICAL / WARNING / INFO) only. They never write, modify, or suggest sed commands. Report only.
update always diffs — update-* commands read the existing file, compute the change, show a unified diff, and wait for explicit confirmation before writing a single byte.
Show file tree after writes — After any write operation, list all created or modified files and display the resulting file tree.
Testing-aware output — New or updated examples must include a realistic validation path. See references/testing.md.
Suggest next step — End every command with a concrete suggestion: which command to run next, or what to validate.
Standard Operational Flow
Every command follows this exact sequence:
Step 1 — Discovery
Read: CLAUDE.md → ansible.cfg → README.md → filesystem scan
Build: internal context (roles_path, collections_path, existing roles, collections, inventory)
Report: "Discovery complete: [summary of what was found]"
Skip Step 1 only if the user provided all required parameters inline.
Step 2 — Parameter Collection
- If the user already provided all required parameters: proceed to Step 3.
- Otherwise: ask one question at a time, using discovery context for smart defaults.
- Never ask for something that can be inferred from discovery (e.g., don't ask for namespace if a collection already exists).
Step 3 — Pre-Write Confirmation
- For new files: show a summary of what will be created (paths + brief description).
- For update commands: show a unified diff (
--- original, +++ proposed).
- Wait for explicit user confirmation (
yes, y, or equivalent) before proceeding.
- If user says no: ask what to change and loop back to Step 2.
Step 4 — Execution
- Write or modify files using bash commands.
- Follow all global rules: FQCN, tags, no_log.
- Use templates from the appropriate
references/ file as the base.
Step 5 — Final Output
Show file tree of all created/modified files.
Suggest: "Next step: [specific actionable suggestion]"
Reference Files
| File |
Used by |
references/discovery.md |
All commands — Step 1 |
references/best_practices.md |
All commands — FQCN, tags, no_log, idempotency |
references/playbook.md |
new-playbook, review-playbook, update-playbook |
references/role.md |
new-role, review-role, update-role |
references/collection.md |
new-collection, review-collection, update-collection |
references/ansible_cfg.md |
new-conf, review-conf, update-conf |
references/inventory.md |
All commands — inventory context |
references/testing.md |
All commands — validation and example test guidance |
references/security_vault.md |
All commands — secret handling and vault-safe patterns |
references/plugins.md |
Collection commands — module/filter/lookup guidance |
Installation
Install via the Claude Code marketplace from 3A2DEV/ansible-designer. This preserves the ansible-designer: namespace prefix for all sub-commands.
Requires Claude Code.
1---2name: ansible-designer3description: AI-assisted Ansible authoring toolkit for Claude Code. Scaffolds, reviews, and updates playbooks, roles, collections, and ansible.cfg files following production best practices. Sub-commands: new-playbook, review-playbook, update-playbook, new-role, review-role, update-role, new-collection, review-collection, update-collection, new-conf, review-conf, update-conf. Runs discovery (CLAUDE.md to ansible.cfg to README to filesystem) at the start of every command.4---56# ansible-designer78AI-assisted Ansible authoring toolkit. Scaffolds, reviews, and updates Ansible projects with production-quality output following official ansible-core 2.15+ conventions.910---1112## Available Commands1314All commands are top-level regardless of install path.1516### Playbook Commands17| Command | Description |18|---------|-------------|19| `/new-playbook` | Create a new playbook (site, component, or AWX-ready) |20| `/review-playbook` | Review an existing playbook — severity report, no file modification |21| `/update-playbook` | Update a playbook — shows diff, requires confirmation |2223### Role Commands24| Command | Description |25|---------|-------------|26| `/new-role` | Scaffold a complete role — asks about multi-OS support |27| `/review-role` | Review a role — severity report, no file modification |28| `/update-role` | Update a role — shows diff, requires confirmation |2930### Collection Commands31| Command | Description |32|---------|-------------|33| `/new-collection` | Scaffold a new collection with galaxy.yml, plugins, roles structure |34| `/review-collection` | Review a collection — severity report, no file modification |35| `/update-collection` | Update a collection — shows diff, requires confirmation |3637### ansible.cfg Commands38| Command | Description |39|---------|-------------|40| `/new-conf` | Generate an annotated ansible.cfg for dev, CI, or AWX |41| `/review-conf` | Review an ansible.cfg — severity report, no file modification |42| `/update-conf` | Update ansible.cfg — shows diff, requires confirmation |4344---4546## Global Rules4748Every sub-command enforces these rules without exception:49501. **Discovery first** — At command start, read in order: `CLAUDE.md` → `ansible.cfg` → `README.md` → filesystem scan. Build internal context (roles, collections, paths, namespace). Skip if user already provided all required parameters inline. See `references/discovery.md`.51522. **Never overwrite silently** — Before writing any file, show a summary (new files) or unified diff (modifications). Wait for explicit user confirmation (`yes` / `y`). Only write after confirmation.53543. **FQCN mandatory** — Every module reference uses the Fully Qualified Collection Name. `ansible.builtin.copy`, never `copy`. `ansible.builtin.service`, never `service`. See `references/best_practices.md`.55564. **no_log: true on secrets** — Every task handling passwords, tokens, API keys, vault variables, or credentials must include `no_log: true`. See `references/security_vault.md`.57585. **Tags on every task** — Minimum: component name + action category (`install`, `configure`, `service`, `validate`, `security`, `cleanup`). No task may be untagged.59606. **review never modifies** — `review-*` commands produce a structured severity report (CRITICAL / WARNING / INFO) only. They never write, modify, or suggest `sed` commands. Report only.61627. **update always diffs** — `update-*` commands read the existing file, compute the change, show a unified diff, and wait for explicit confirmation before writing a single byte.63648. **Show file tree after writes** — After any write operation, list all created or modified files and display the resulting file tree.65669. **Testing-aware output** — New or updated examples must include a realistic validation path. See `references/testing.md`.676810. **Suggest next step** — End every command with a concrete suggestion: which command to run next, or what to validate.6970---7172## Standard Operational Flow7374Every command follows this exact sequence:7576### Step 1 — Discovery77```78Read: CLAUDE.md → ansible.cfg → README.md → filesystem scan79Build: internal context (roles_path, collections_path, existing roles, collections, inventory)80Report: "Discovery complete: [summary of what was found]"81```8283Skip Step 1 only if the user provided all required parameters inline.8485### Step 2 — Parameter Collection86- If the user already provided all required parameters: proceed to Step 3.87- Otherwise: ask **one question at a time**, using discovery context for smart defaults.88- Never ask for something that can be inferred from discovery (e.g., don't ask for namespace if a collection already exists).8990### Step 3 — Pre-Write Confirmation91- For **new** files: show a summary of what will be created (paths + brief description).92- For **update** commands: show a unified diff (`--- original`, `+++ proposed`).93- **Wait for explicit user confirmation** (`yes`, `y`, or equivalent) before proceeding.94- If user says no: ask what to change and loop back to Step 2.9596### Step 4 — Execution97- Write or modify files using bash commands.98- Follow all global rules: FQCN, tags, no_log.99- Use templates from the appropriate `references/` file as the base.100101### Step 5 — Final Output102```103Show file tree of all created/modified files.104Suggest: "Next step: [specific actionable suggestion]"105```106107---108109## Reference Files110111| File | Used by |112|------|---------|113| `references/discovery.md` | All commands — Step 1 |114| `references/best_practices.md` | All commands — FQCN, tags, no_log, idempotency |115| `references/playbook.md` | new-playbook, review-playbook, update-playbook |116| `references/role.md` | new-role, review-role, update-role |117| `references/collection.md` | new-collection, review-collection, update-collection |118| `references/ansible_cfg.md` | new-conf, review-conf, update-conf |119| `references/inventory.md` | All commands — inventory context |120| `references/testing.md` | All commands — validation and example test guidance |121| `references/security_vault.md` | All commands — secret handling and vault-safe patterns |122| `references/plugins.md` | Collection commands — module/filter/lookup guidance |123124---125126## Installation127128Install via the Claude Code marketplace from `3A2DEV/ansible-designer`. This preserves the `ansible-designer:` namespace prefix for all sub-commands.129130Requires Claude Code.