name: ansible-validate description: Validate Ansible playbook syntax and run ansible-lint allowed-tools: Bash(source ~/.ansible-venv/bin/activate*), Bash(ansible*), Read, Grep, Glob
Validate Ansible syntax and lint for this project.
Steps
-
Activate the project venv and run syntax check:
source ~/.ansible-venv/bin/activate && ansible-playbook -vv -i tests/inventory tests/test.yml --syntax-check -
Run ansible-lint on the target scope:
- If
$ARGUMENTSis empty, lint the full playbook:source ~/.ansible-venv/bin/activate && ansible-lint site.yml - If
$ARGUMENTSspecifies a role name (e.g.,vagrant), lint that role:source ~/.ansible-venv/bin/activate && ansible-lint local-roles/<role_name>/ - If
$ARGUMENTSspecifies a file path, lint that file:source ~/.ansible-venv/bin/activate && ansible-lint <file_path>
- If
-
Report results clearly:
- If both pass: confirm success
- If either fails: show the errors and suggest fixes based on the project's
.ansible-lintconfig (production profile, see skip_list for tolerated rules)
Notes
- The venv is at
~/.ansible-venv - The lint config is in
.ansible-lint(production profile) - External roles in
roles/are excluded from linting - All working paths are relative to the project root
Skills similaires
Expert Next.js App Router
Developpement
Un skill qui transforme Claude en expert Next.js App Router.
Claude CodeCursoradvanced
890
234
3,180
Générateur de README
Developpement
Crée des README.md professionnels et complets pour vos projets.
claudeCursorWindsurfbeginner
259
72
1,083
Rédacteur de Documentation API
Developpement
Génère de la documentation API complète au format OpenAPI/Swagger.
claudeCursorWindsurfintermediate
156
44
943