AN

ansible-validate

Validates Ansible playbook syntax and executes ansible-lint against project configurations.

Install

mkdir -p .claude/skills/ansible-validate && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/12055" && unzip -o skill.zip -d .claude/skills/ansible-validate && rm skill.zip

Installs to .claude/skills/ansible-validate

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Validate Ansible playbook syntax and run ansible-lint
53 charsno explicit “when” trigger
Beginner

Key capabilities

  • Activate the project's virtual environment
  • Run Ansible playbook syntax checks
  • Execute ansible-lint on specified scopes
  • Report success or failure of checks
  • Suggest fixes based on project configuration

How it works

The skill activates a specified virtual environment and then runs ansible-playbook for syntax checks and ansible-lint for code quality, reporting outcomes.

Inputs & outputs

You give it
Ansible playbook files or role names
You get back
Validation results with success/failure status and suggested fixes

When to use ansible-validate

  • Validate playbook syntax
  • Lint Ansible roles
  • Check configuration files
  • Test inventory configuration

About this skill

Validate Ansible syntax and lint for this project.

Steps

  1. Activate the project venv and run syntax check:

    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:
      source ~/.ansible-venv/bin/activate && ansible-lint site.yml
      
    • If $ARGUMENTS specifies a role name (e.g., vagrant), lint that role:
      source ~/.ansible-venv/bin/activate && ansible-lint local-roles/<role_name>/
      
    • If $ARGUMENTS specifies a file path, lint that file:
      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

When not to use it

  • When linting external roles in the 'roles/' directory
  • When the project does not use a virtual environment at ~/.ansible-venv
  • When the project does not have an .ansible-lint configuration file

Limitations

  • External roles in `roles/` are excluded from linting
  • The virtual environment path is fixed at `~/.ansible-venv`
  • The lint configuration is fixed to `.ansible-lint`

How it compares

This skill automates the setup and execution of Ansible syntax and lint checks, providing a structured approach compared to manually running commands.

Compared to similar skills

ansible-validate side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
ansible-validate (this skill)05moReviewBeginner
machine-learning-ops-ml-pipeline44moNo flagsAdvanced
uv35moReviewBeginner
vastai-core-workflow-b127dReviewAdvanced

Try saying

Example prompts that trigger this skill in your AI assistant.

Search skills

Search the agent skills registry