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

release 0.14rc2 produces stack trace when trying to read vaulted file #86

Open
ansiblejunky opened this issue Dec 5, 2019 · 0 comments

Comments

@ansiblejunky
Copy link

ansiblejunky commented Dec 5, 2019

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.

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

No branches or pull requests

1 participant