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
Debian. (older) versions of ansible and ansible-lint are installed through the package manager as well.
STEPS TO REPRODUCE
Test case hello.yml:
abc
ansible-lint hello.yml
Desired Behaviour
A single error line saying that it couldn't find any items in the alleged playbook?
Actual Behaviour
$ cat hello.yml
abc
$ ansible-lint -vvvvvvv hello.yml
Traceback (most recent call last):
File "/home/user/.local/bin/ansible-lint", line 10, in <module>
sys.exit(main())
File "/home/user/.local/lib/python3.7/site-packages/ansiblelint/__main__.py", line 160, in main
matches.extend(runner.run())
File "/home/user/.local/lib/python3.7/site-packages/ansiblelint/runner.py", line 78, in run
matches = set(self._emit_matches(files))
File "/home/user/.local/lib/python3.7/site-packages/ansiblelint/runner.py", line 103, in _emit_matches
for child in ansiblelint.utils.find_children(arg, self.playbook_dir):
File "/home/user/.local/lib/python3.7/site-packages/ansiblelint/utils.py", line 162, in find_children
items = _playbook_items(playbook_ds)
File "/home/user/.local/lib/python3.7/site-packages/ansiblelint/utils.py", line 137, in _playbook_items
return [item for play in pb_data for item in play.items()]
File "/home/user/.local/lib/python3.7/site-packages/ansiblelint/utils.py", line 137, in <listcomp>
return [item for play in pb_data for item in play.items()]
AttributeError: 'str' object has no attribute 'items'
The text was updated successfully, but these errors were encountered:
Summary
While this file is probably not valid YAML,
ansible-lint
crashes with a not terribly useful error message -hello.yml
:Issue Type
Ansible and Ansible Lint details
OS / ENVIRONMENT
Debian. (older) versions of
ansible
andansible-lint
are installed through the package manager as well.STEPS TO REPRODUCE
Test case
hello.yml
:ansible-lint hello.yml
Desired Behaviour
A single error line saying that it couldn't find any items in the alleged playbook?
Actual Behaviour
The text was updated successfully, but these errors were encountered: