ansible-review icon indicating copy to clipboard operation
ansible-review copied to clipboard

Stacktrace when providing custom config file using ansible-review 0.14.0rc1

Open ansiblejunky opened this issue 5 years ago • 1 comments

I am trying the new tagged v0.14.0rc1 and even though it seems to fix the original issue with vaulted strings, I hit an issue with providing a custom config file.

> cat .ansible-review
[rules]
lint = ./.ansible-linting/lint-rules/
standards = ./.ansible-linting

And running the tool produces...

> ansible-review -c .ansible-review vars/main.yml
Traceback (most recent call last):
  File "/usr/local/bin/ansible-review", line 10, in <module>
    sys.exit(main())
  File "/tmp/ansible-review/lib/ansiblereview/__main__.py", line 56, in main
    settings = read_config(options.configfile)
  File "/tmp/ansible-review/lib/ansiblereview/utils/__init__.py", line 163, in read_config
    indent_list_items=config.getboolean('rules', 'indent_list_items')
  File "/usr/local/Cellar/python@2/2.7.16/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ConfigParser.py", line 369, in getboolean
    if v.lower() not in self._boolean_states:
AttributeError: 'bool' object has no attribute 'lower'

ansiblejunky avatar Aug 30 '19 01:08 ansiblejunky

Thanks @ansiblejunky - I clearly missed testing it without that value set.

willthames avatar Aug 30 '19 02:08 willthames