YAMLTools logo
Free · no sign-up · in your browser

Ansible playbook validator

Paste a playbook or a task file and check it before ansible-playbook: structure, modules, handlers and the tasks that are risky to run against production.

Ansible
YAML
Loading editor…

Paste a file on the left to validate it.

CREA.MBA
CREA.MBA

Ship your next product faster with AI-ready Next.js

The boilerplate designed for AI to understand your project. Use code YAMLTOOLS for 5% off!

Start Building
Ad

What YAMLTools checks in your Ansible file

  • Plays with hosts and tasks, and task files as lists of tasks.
  • Tasks with no module, or with two modules at once.
  • notify pointing to handlers that are not defined (names must match exactly).
  • Common typos in well-known keys such as become, when, loop and register.
  • Jinja braces inside when, and modules called by their short name instead of the FQCN (ansible.builtin.copy).

Risks it flags

  • Passwords and tokens in vars instead of Ansible Vault.
  • shell and command where a module would be idempotent.
  • Files created with permissions such as 0777.
  • ignore_errors on tasks, and tasks that handle secrets without no_log.
  • Downloads with certificate validation disabled, or piped straight into a shell.

Common Ansible errors

The ones that break a deploy most often, and how YAMLTools reports them.

Handler that does not exist

notify: Restart nginx
# handler: restart nginx

Handler names are case-sensitive: this one is never notified. YAMLTools points to the notify that nothing handles.

Unquoted Jinja value

path: {{ app_dir }}/config

A value that starts with {{ must be quoted, or YAML reads it as a dictionary and the playbook fails to load.

Two modules in one task

- name: Install
  apt: name=nginx
  service: name=nginx

Each task runs one module. Split it in two tasks.

Your file stays on your computer

Validation, risk analysis, diagram and conversions run in your browser. Nothing is uploaded unless you decide to save it with an account.

Ansible playbook validator FAQ

Playbooks, roles and what happens with your file.