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>
879 B
879 B
Scaffold and implement a new Ansible role
Role name: $ARGUMENTS
Steps
- Run
make new-role NAME=$ARGUMENTSto create the directory structure - Verify
roles/$ARGUMENTS/molecule/default/converge.ymlreferences$ARGUMENTS(auto-substituted bymake new-role) - Fill in
roles/$ARGUMENTS/meta/main.ymlwith role metadata (Debian 13 platform) - Add well-commented placeholder variables to
roles/$ARGUMENTS/defaults/main.ymlusing$ARGUMENTS__varnamenamespace - 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
- Write
roles/$ARGUMENTS/README.mdwith: purpose, variable reference table, example playbook - Run
make lint— fix any issues - Run
make test ROLE=$ARGUMENTS— fix any failures - Show a summary of what was created and any open TODOs