← ClaudeAtlas

new-playbooklisted

Create a new Ansible playbook. Triggered by /new-playbook. Runs discovery to find existing roles and collections, then collects path, filename, target hosts/groups, and roles to include. Generates a complete playbook with header, vars block, pre/post tasks, roles section, error handling, and tags. Shows summary before writing. Never overwrites existing files without confirmation.
3A2DEV/ansible-designer · ★ 5 · Data & Documents · score 63
Install: claude install-skill 3A2DEV/ansible-designer
# new-playbook Create a new Ansible playbook following production conventions. --- ## Required Inputs Collect these parameters (one question at a time, using discovery context for defaults): 1. **path** — Directory where the playbook will be created (default: `./` or `./playbooks/` if that directory exists) 2. **filename** — Playbook filename (e.g., `site.yml`, `deploy-nginx.yml`) 3. **target_hosts** — Inventory group(s) or host pattern (e.g., `webservers`, `all`, `databases:webservers`) 4. **roles** — List of roles to include (suggest roles found in discovery; accept FQCN or short names) 5. **playbook_type** — Site playbook / Component playbook / AWX-ready playbook (suggest based on filename and roles) If the user provides all of these inline, skip parameter collection. --- ## Behavior ### Step 1 — Discovery Run discovery per `references/discovery.md`. Report: - Roles found (in roles_path) - Collections found (in collections_path) - Existing playbooks - Inventory location Use discovered roles as suggestions during parameter collection. ### Step 2 — Parameter Collection Ask one question at a time. Suggest smart defaults: - If `site.yml` is the filename → suggest site playbook type - If single role → suggest component playbook type - If AWX is mentioned or `tower_job_id` is referenced → suggest AWX-ready type - Roles list: show numbered list of discovered roles, let user pick by number or type FQCN ### Step 3 — Pre-Write Confirmation Show a summary: ``` Will create