mschuchard / linter-ansible-linting

ansible-lint linter for pulsar

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Not checking roles/playbooks?

LaurentDumont opened this issue · comments

Ansible-Lint - 3.4.11
Atom - 1.13.1
Ansible 2.2.1.0
Debian Stretch
Hi,

I'm following a directory structure that looks like this :

ansible/playbook_name.yml
ansible/roles/playbook_name/tasks/main.yml (with includes)
ansible/roles/playbook_name/tasks/tasks_list_1.yml
ansible/roles/playbook_name/tasks/tasks_list_2.yml

A playbook looks like this

---
- hosts: all
  become: yes
  roles:
    - playbook_name

It seems Ansible-Lint is able to see issues in the root playbook but not for any file in the roles/tasks subfolder. If I manually run the Ansible-Lint bin from the command line against the root Playbook, I get a few hits, but directly against a task_list_1 or the main.yml, I get nothing back.

I figured it would be able to link the files from the roles statement in the playbook. Am I missing something?

Indeed, this is currently the behavior of this linter package. In the next release, it will in fact show the issues from includes and roles within those includes and roles when linting from the playbook. However, the displaying happened by default with Atom-Linter < 2, and now requires some extra steps with Atom-Linter 2.0 since it outsources the UI to another package that is undergoing rapid development. Once that package stabilizes, I will have a good idea of how to accommodate for it, and can push out an update with this feature you are expecting.

@LaurentDumont The new version with this feature has been released. Enjoy!

@mschuchard Hey! Glad to see an update on this.

-edit a quick restart fixed anything-

Thanks a lot, works like a charm now. 💯