Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Add ansible syntax checker #1599
Not sure if I did this wrong, but as far as I understand I need to set "# vim:ft=ansible:" at the end of the file to make the plugin work, however when I do:
@badnetmask Yes, you need to set the
@erikzaadi I don't use vim-ansible-yaml, so I rely on vim to figure out syntax highlight. I am guessing it thinks it's a yaml file, as I use yml extension on my playbooks.
This is what I see on the debug output when I run the check without "ft=ansible":
And this when I set "ft=ansible":
Apparently the error is the '-p'.
ansible-lint: error: no such option: -p
$ ansible-lint --version
By the way this is the lint output when I run without -p:
By the way, the only positive thing of installing vim-ansible-yaml is that now I get syntax highlighting when I set "ft=ansible", however the file still gets detected as yaml when the tag is not set.
OK, I am now using ansible-lint from github, and syntastic is not working as I would expect. I use it daily to validate Puppet code, and when I save something bad I get a new vim window with the errors, while with an ansible file all I see is a red bad that appears quickly on the screen, then disappears, and it gives me back the bash prompt.
Running on debug mode, manually, this is what I see: