linter not working with ansible 2.8.6
serpro69 opened this issue · comments
Not sure if I'm doing something wrong or
Here are the versions I'm using:
✓ ~→ ansible-lint --version [09:39:34]
ansible-lint 4.1.0
✓ ~→ ansible --version [09:40:53]
ansible 2.8.6
config file = /home/sergio/.ansible.cfg
configured module search path = ['/home/sergio/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /home/sergio/.virtualenvs/oci/lib/python3.6/site-packages/ansible
executable location = /home/sergio/.virtualenvs/oci/bin/ansible
python version = 3.6.8 (default, Oct 7 2019, 12:59:55) [GCC 8.3.0]
I've freshly installed atom, added base linter
package and it's dependencies, then added this package.
I've explicitly put some errors in site.yml
file:
- name: Install MIT KDC Server
hosts: tag_cloudera=manager
roles:
- { role: krb5_server, when: krb5_kdc_type == 'mit' }
tags: krb5
But when I open the file in atom I don't see any errors there.
Could you help me figure this out? Is this a package issue or am I doing something wrong?
If you added the Atom package dependencies, then the next likely culprit is that ansible-lint
is not in the path accessible by Atom (depending upon the environment of the user when and how it was launched). Since I notice you have ansible-lint
installed in a virtualenv, that is likely the cause here.
You can go to the config settings and set the path to ansible-lint
there. Give that a try.
Hi. Thanks for prompt response!
Does this package depend on anything else other than what I listed above (Base Linter package and it's dependencies?)
I've actually tried explicitly specifying the path to ansible-lint
in the settings, but that didn't seem to help.
Other than the dependencies specified in the documentation, you should also have Linter-Ui-Default installed as a dependency of Atom-Linter. You can check to ensure that.
Here's the output of atom packages:
✓ ~→ la ~/.atom/packages [15:20:20]
total 52K
drwxrwxr-x 13 sergio sergio 4.0K Oct 23 15:16 ./
drwxrwxr-x 9 sergio sergio 4.0K Oct 23 15:19 ../
drwxrwxr-x 10 sergio sergio 4.0K Oct 23 09:24 ansible-vault/
drwxrwxr-x 3 sergio sergio 4.0K Oct 23 10:04 atom-material-syntax/
drwxrwxr-x 7 sergio sergio 4.0K Oct 23 10:00 atom-material-ui/
drwxrwxr-x 8 sergio sergio 4.0K Oct 23 09:50 autocomplete-ansible/
drwxrwxr-x 7 sergio sergio 4.0K Oct 23 09:29 busy-signal/
drwxrwxr-x 8 sergio sergio 4.0K Oct 23 09:29 intentions/
drwxrwxr-x 6 sergio sergio 4.0K Oct 23 15:16 language-ansible/
drwxrwxr-x 6 sergio sergio 4.0K Oct 23 09:28 linter/
drwxrwxr-x 5 sergio sergio 4.0K Oct 23 09:30 linter-ansible-linting/
drwxrwxr-x 5 sergio sergio 4.0K Oct 23 09:48 linter-ansible-syntax/
drwxrwxr-x 8 sergio sergio 4.0K Oct 23 09:29 linter-ui-default/
I've also explicitly set ansible-lint
in settings to point to actual liter, not the one in virtualenv (though I don't know why virtualenv would work if it's specified explicitly)
Still not getting any linting errors in the ide. Do I need to activate the plugin or do any extra steps while using it?
And here's the Linter Debug Info:
Platform: linux
Atom Version: 1.40.1
Linter Version: 2.3.1
Opened file is ignored: No
Matching Linter Providers:
Disabled Linter Providers:
Standard Linter Providers:
- Ansible
- Ansible-Lint
Indie Linter Providers:
UI Providers:
- Linter
Ignore Glob: **/*.min.{js,css}
VCS Ignored Paths are excluded: true
Current File Scopes:
- *
- source.yaml
I think I've found the issue. Needed to create file type associations.
Thanks for your inputs and for the plugin!
As as a side note Language-Ansible-Advanced will also work, but I have not tried it yet personally. I am going to add that to the doc for the dependencies.