Skip to content

Hosts JSON validation schemas for Ansible files, used by vscode-ansible extension.

License

Notifications You must be signed in to change notification settings

ChristinWhite/schemas

 
 

Repository files navigation

Schemas for Ansible and Zuul

This project that aims to generate JSON/YAML validation schemas for Ansible files as playbooks, tasks, requirements, meta or vars.

Keep in mind that these schemas will limit your freedom of choice regarding the syntax you can use to write Ansible tasks as they do not allow some historical forms which are still allowed by Ansible itself.

Not any file accepted by Ansible will pass these schemas but we do expect that any file that passed these schemas should be accepted by Ansible.

  • YAML 1.2 booleans are required as true or false, while Ansible itself allows you to use more relaxed forms like yes or no.
  • Inline actions are not allowed, as schema cannot validate them
  • Non builtin modules must be called using action: blocks
  • Module arguments are not yet verified but we plan to implement it

As these schemas are experimental, please refrain from reporting bugs but feel free to create pull-requests to improve the schema.

Activating the schemas

At this moment installing Ansible Language for vscode extension will activate these schemas. The file patterns used to trigger their use can be seen here

Because these schemas are generic, you can easily use them with any validators that support them.

About

Hosts JSON validation schemas for Ansible files, used by vscode-ansible extension.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%