2026-05-30 14:10:01 +02:00
|
|
|
# Scaffold and implement a new Ansible role
|
|
|
|
|
|
|
|
|
|
Role name: $ARGUMENTS
|
|
|
|
|
|
|
|
|
|
## Steps
|
|
|
|
|
|
|
|
|
|
1. Run `make new-role NAME=$ARGUMENTS` to create the directory structure
|
2026-05-30 19:34:02 +02:00
|
|
|
2. Verify `roles/$ARGUMENTS/molecule/default/converge.yml` references `$ARGUMENTS` (auto-substituted by `make new-role`)
|
2026-05-30 14:10:01 +02:00
|
|
|
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
|