Developing ansible playbooks
Provide guidelines on how to develop Ansible playbooks that are compliant with project standards. Should be used when generating, modifying, or reviewing Ansible playbooks, roles, or collections.From its SKILL.md
npx -y skills add brlin-tw/developing-ansible-playbooksAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
1.6 KB, 305 tokens by cl100k_base, as published. Nobody here has run it
The developing-ansible-playbooks agent skill
Provide guidelines on how to develop Ansible playbooks that are compliant with project standards. Should be used when generating, modifying, or reviewing Ansible playbooks, roles, or collections.
Rule of thumb
If the Ansible playbook, role, or collection being developed has existing examples in the project repository, always refer to those examples and mimic their style and structure to ensure consistency.
If there are no existing examples in the project repository, refer to the following guidelines:
Task structure
The following structure should be followed for each task in the Ansible playbook:
- The
whenkey should be placed at the start of the task, right after thenamekey. - The module name should always be the last key of the task.
- The fully qualified collection name (FQCN) form should always be used.
- If the
becomekey is used, it should be placed right after thewhenkey. - The
becomekey is mandatory for tasks that require elevated privileges. - Ansible fact references should use the
ansible_factsprefix (e.g.,ansible_facts['os_family']instead ofansible_os_family). - Use
loopinstead ofwith_itemsfor iterating over lists. - When loops are used, customize the loop variable name using
loop_controlfor better readability. - Always use
trueandfalsefor boolean values.
What ships with it: 26 files
95.0 KB alongside SKILL.md, 10 of them executable
LICENSES/
- CC-BY-SA-4.0.txt17.9 KB
- WTFPL.txt432 B
continuous-integration/
- create-gitlab-release.shruns2.1 KB
- do-static-analysis.install-system-deps.shruns7.0 KB
- do-static-analysis.shruns2.2 KB
- generate-build-artifacts.install-system-deps.shruns3.3 KB
- generate-build-artifacts.shruns3.0 KB
- generate-release-description.shruns4.3 KB
- patch-github-actions-sudo-security-policy.shruns4.2 KB
- sudoers.d/90_allow_github_actions_default_envvars.sudoers704 B
- sudoers.d/README.md365 B
- upload-gitlab-generic-packages.shruns1.8 KB
dev-assets/
- deploy-development-environment.shruns4.4 KB
- README.md93 B
- .editorconfig1.5 KB
- functions.shruns26.3 KB
- .gitattributes621 B
- .gitignore1.7 KB
- .gitlab-ci.yml1.8 KB
- .gitmodules230 B
- .markdownlint.yml1.4 KB
- .pre-commit-config.yaml2.3 KB
- README.md693 B
- REUSE.toml496 B
- .shellcheckrc403 B
- .yamllint5.7 KB