Skip to content
Back to skills

Ansible Validate

ASecurity

Validate Ansible playbook syntax and run ansible-lint

  • 2 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 9, 2026
devopsbash

Security analysis

A100/100

Scanned September 9, 2026

npx -y skills add CesarBallardini/ansible-devops-workstation --skill ansible-validate --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Ansible Validate?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Ansible Validate
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/cesarballardini-ansible-validate/badge)](https://www.skillsdirectory.com/skills/cesarballardini-ansible-validate)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
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

1. Activate the project venv and run syntax check:
   ```bash
   source ~/.ansible-venv/bin/activate && ansible-playbook -vv -i tests/inventory tests/test.yml --syntax-check
   ```

2. Run ansible-lint on the target scope:
   - If `$ARGUMENTS` is empty, lint the full playbook:
     ```bash
     source ~/.ansible-venv/bin/activate && ansible-lint site.yml
     ```
   - If `$ARGUMENTS` specifies a role name (e.g., `vagrant`), lint that role:
     ```bash
     source ~/.ansible-venv/bin/activate && ansible-lint local-roles/<role_name>/
     ```
   - If `$ARGUMENTS` specifies a file path, lint that file:
     ```bash
     source ~/.ansible-venv/bin/activate && ansible-lint <file_path>
     ```

3. Report results clearly:
   - If both pass: confirm success
   - If either fails: show the errors and suggest fixes based on the project's `.ansible-lint` config (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

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.