ansible-validator

Validate, lint, and security-check Ansible playbooks, roles, and inventories.

7|3|Updated May 4, 2026
One-click install
npx skills add https://github.com/nopperabbo/codebuddy2api --skill ansible-validator-nopperabbo
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ansible-validator
Source: https://github.com/nopperabbo/codebuddy2api/tree/main/opencode-config/skills/_archived/ansible-validator
Command: npx skills add https://github.com/nopperabbo/codebuddy2api --skill ansible-validator-nopperabbo

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pyyaml, yamllint, ansible-lint, checkov, molecule, docker, and includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

Validate, lint, audit, or debug Ansible playbooks, roles, inventories, FQCN, tasks.

Core Features & Use Cases

  • Validate syntax and structure of playbooks, roles, and inventories.
  • Lint for best practices and security checks, supported by Checkov, yamllint, and ansible-lint.
  • Molecule-driven role testing and documentation lookup for private or custom modules.
  • Automatic documentation lookup for modules and collections with version awareness to speed debugging.

Quick Start

Run the validation workflow on your Ansible project by pointing to a path, for example: bash scripts/validate_playbook.sh test/playbooks/good-playbook.yml.

Frequently Asked Questions about ansible-validator

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I validate and lint Ansible playbooks end-to-end?

Ansible playbook validation and linting is automated by running a script that applies yamllint, ansible-lint, and Checkov to verify syntax, enforce best practices, and run security checks across playbooks, roles, and inventories.

What's the best way to run security checks on Ansible roles in CI?

Security checks for Ansible roles in CI are handled by integrating Checkov and ansible-lint into workflows, scanning infrastructure-as-code for misconfigurations and policy violations before deployment.

Can I use Molecule to test Ansible roles with Docker?

Molecule-driven role testing with Docker is supported to execute dry-run checks and validate role behavior end-to-end, ensuring playbooks perform correctly before they reach production environments.

Does this validation workflow support documentation lookup for custom Ansible modules?

Automatic documentation lookup for custom and private Ansible modules is supported with version awareness, allowing you to quickly retrieve module and collection specs to speed up debugging tasks.

Do I need PyYAML and yamllint to parse Ansible inventories?

PyYAML is required for parsing Ansible inventories and playbooks, while yamllint enforces YAML structure and syntax validation to catch formatting errors before execution.

Why does ansible-lint fail on FQCN tasks in my playbook?

FQCN task linting failures occur when tasks lack fully qualified collection names, which ansible-lint flags as best practice violations to ensure playbooks reference modules explicitly and avoid naming conflicts.