Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not detecting malformed blocks #34

Open
nvtkaszpir opened this issue Sep 6, 2017 · 1 comment
Open

Not detecting malformed blocks #34

nvtkaszpir opened this issue Sep 6, 2017 · 1 comment

Comments

@nvtkaszpir
Copy link
Contributor

example main.yaml:

- when: ansible_distribution_release == 'xenial'
  block:

output - no error.
ansible shows somethig way different:

ERROR! A malformed block was encountered.

The error appears to have been in 'roles/something/tasks/main.yml': line ...., column 3, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:


- when: ansible_distribution_release == 'xenial'
  ^ here

Expected behavior: detect and report malformed blocks.

@willthames
Copy link
Owner

I'd probably need to use a bit more of ansible's block processing logic, which could cause other problems.

Does this pass ansible --syntax-check? (I have no plans to solve problems detected by ansible's syntax checker which can be run as a precursor to ansible-review)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants