Wrong syntax for import_role in the ansible part of the templates.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
tripleo |
Fix Released
|
Critical
|
Sofer Athlan-Guyot |
Bug Description
Hi,
discovered while testing the linting of the resulting template, so I don't have yet a public link to give yet[0]
But what you get is the cryptic following error:
Traceback (most recent call last):
File "/tmp/.
sys.
File "/tmp/.
matches.
File "/tmp/.
for child in ansiblelint.
File "/tmp/.
for child in play_children(
File "/tmp/.
return delegate_
File "/tmp/.
main=
File "/tmp/.
results.
File "/tmp/.
role_path = _rolepath(basedir, role)
File "/tmp/.
path_
File "/tmp/.
if b.startswith('/'):
AttributeError: 'NoneType' object has no attribute 'startswith'
After some debugging of the trace it boiled down to this code[1]:
- block:
- name: load openvswitch module
After investigation that is the part that is failing in the ansible-lint part[2]
elif 'import_role' in th:
main=th[
we can see that it tries to access 'name' not 'role'. This is in line with the documentation[3].
So It seems the import_role parameter here is wrong and should be 'name', not 'role'.
[0] those are the reviews tested https:/
[2] https:/
[3] https:/
Fix proposed to branch: master /review. openstack. org/609754
Review: https:/