Closed bvergnaud closed 4 years ago
@bvergnaud did it work in 4.1?
Yes it did. However the 4.1 will not install from source, in pre-commit. https://github.com/ansible/ansible-lint/issues/590
@ssbarnea @awcrosby ^
I see this was introduced in #528, the skip logic does not check for a file_type
of pre_tasks
. #641 was added to fix this.
@bvergnaud ansible-lint 4.2.0rc2 has this fix included
Wonderful. Thanks a lot. :)
Issue Type
Ansible and Ansible Lint details
Desired Behaviour
When importing a playbook from within another playbook, ansible-lint should properly guess that it is a type playbook.
Actual Behaviour (Bug report only)
When you include a playbook in the pre-tasks sections (we need that secondary playbook to play before the roles) the linter guess its type as 'pre_tasks', and reports the following error multiple times in my case (I didn't manage to find what the number of error is based on):
Error trying to append skipped rules: RuntimeError('Unexpected file type: pre_tasks')
.Example playbook1.yml :
The included
playbook2.yml
is another playbook right next to the first one, and could contain anything. The error does not cause the return code to change which is lucky in my case as I'm trying to bake it in the pre-commit routine.