On 2/21/14, 2:27 PM, Michael DeHaan wrote:
> So for starters, though it's not everything:
>
> ansible-playbook --syntax-check exists
>
> Part of the issue here is that it does a bit too much manual work,
> rather than relying on logic in the Playbook/Play classes, as it should
> -- which has been on the list for a little while to get more back into
> shared code.
>
> I generally believe this should be a task for core ansible, not a
> linter, and is why for instance we added a warnings feature for
> deprecation and some of the common YAML errors.
>
> (i.e. extra external things shouldn't be required, good things should be
> built in)
Yeah, I'd be really happy if it was built into ansible!
We are aware of --syntax-check, and it helps, along with --list-hosts,
but that doesn't catch attempts to make use of files that don't exist.
Even that is tricky though, because you could be attempting to make use
of a /generated/ file, so there would be false warnings that would have
to be filtered out.
-jlk