871 B
871 B
Scaffold and implement a new Ansible role
Role name: $ARGUMENTS
Steps
- Run
make new-role NAME=$ARGUMENTSto create the directory structure - Update
roles/$ARGUMENTS/molecule/default/converge.yml— replaceROLE_NAME_PLACEHOLDERwith$ARGUMENTS - 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