boma/.claude/commands/new-role.md
sjat 1642d1786a Wire Terraform vlan_tag and fix scaffold placeholder (R9,R11)
R9: pass vlan_tag (default 20 = srv VLAN, ADR-007) from both envs to the
proxmox_vm module so VMs are tagged, not on untagged vmbr0. R11: make new-role
now sed-substitutes ROLE_NAME_PLACEHOLDER so scaffolded molecule converge works
out of the box.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-05-30 19:34:02 +02:00

17 lines
879 B
Markdown

# Scaffold and implement a new Ansible role
Role name: $ARGUMENTS
## Steps
1. Run `make new-role NAME=$ARGUMENTS` to create the directory structure
2. Verify `roles/$ARGUMENTS/molecule/default/converge.yml` references `$ARGUMENTS` (auto-substituted by `make new-role`)
3. Fill in `roles/$ARGUMENTS/meta/main.yml` with role metadata (Debian 13 platform)
4. Add well-commented placeholder variables to `roles/$ARGUMENTS/defaults/main.yml` using `$ARGUMENTS__varname` namespace
5. Write initial tasks in `roles/$ARGUMENTS/tasks/main.yml`:
- Use FQCN for all modules
- Every task has a descriptive `name:` and at least one tag
6. Write `roles/$ARGUMENTS/README.md` with: purpose, variable reference table, example playbook
7. Run `make lint` — fix any issues
8. Run `make test ROLE=$ARGUMENTS` — fix any failures
9. Show a summary of what was created and any open TODOs