Open
Description
We are using the latest RC (0.14rc2) and had a vaulted file vars/pass.yml
and ansible-review crashed with stacktrace when it hit that file. ansible-review is being triggered through pre-commit in this case.
WARN: RoleVars vars/pass.yml is in a role that contains a meta/main.yml without a declared standards version. Using latest standards version 0.1
Traceback (most recent call last):
File "/home/user/.cache/pre-commit/repolIoGop/py_env-python2.7/bin/ansible-review", line 10, in <module>
sys.exit(main())
File "/home/user/.cache/pre-commit/repolIoGop/py_env-python2.7/lib/python2.7/site-packages/ansiblereview/__main__.py", line 102, in main
errors = errors + candidate.review(options, lines)
File "/home/user/.cache/pre-commit/repolIoGop/py_env-python2.7/lib/python2.7/site-packages/ansiblereview/__init__.py", line 76, in review
return utils.review(self, settings, lines)
File "/home/user/.cache/pre-commit/repolIoGop/py_env-python2.7/lib/python2.7/site-packages/ansiblereview/utils/__init__.py", line 121, in review
result = standard.check(candidate, settings)
File "/home/user/.cache/pre-commit/repolIoGop/py_env-python2.7/lib/python2.7/site-packages/ansiblereview/vars.py", line 45, in repeated_vars
for err_key in errors for err_line in errors[err_key]])
TypeError: string indices must be integers, not str
The workaround was to replace the vaulted file with a file containing encrypt_string vaulted strings.
Metadata
Metadata
Assignees
Labels
No labels
Activity