You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
---
- name: prove issuehosts: localhostbecome:no# Here `become:no` is missing a space, should be `become: no`.tasks:
- name: sample taskdebug:
msg: "sample ouput"
Desired Behavior
It would be nice if ansible-lint would report on the faulty line, become:no rather than a later line.
Actual Behavior
ansible-lint throws this warning:
WARNING Listing 1 violation(s) that are fatalsyntax-check: Ansible syntax check failed.playbook.yml:1 ERROR! We were unable to read either as JSON nor YAML, these are the errors we got from each:JSON: Expecting value: line 1 column 1 (char 0)Syntax Error while loading YAML. could not find expected ':'The error appears to be in '/private/tmp/issue/playbook.yml': line 6, column 3, but maybe elsewhere in the file depending on the exact syntax problem.The offending line appears to be: tasks: ^ here
The text was updated successfully, but these errors were encountered:
Summary
When a key-value pair misses a colon, ansible-lint complains about a further line.
Issue Type
Ansible and Ansible Lint details
OS / ENVIRONMENT
Nothing relevant to report.
STEPS TO REPRODUCE
With this playbook:
Desired Behavior
It would be nice if ansible-lint would report on the faulty line,
become:no
rather than a later line.Actual Behavior
ansible-lint throws this warning:
The text was updated successfully, but these errors were encountered: