Comments (4)
ansible-lint does not work with this extension but works with a previous extension below.
https://marketplace.visualstudio.com/items?itemName=tomaciazek.ansible
The previous one shows red error with ansible-lint as below.
However, this extension does not with the same setting.
I set ansible.path, ansibleLint.path, and python.interpreterPath, but does not work. Other features such as autocompletion are working.
My environment is below.
-
OS
WSL (venv) -
ansible --version
ansible [core 2.11.2]
config file = /home/ubuntu/venv/heart-ansible/ansible.cfg
configured module search path = ['/home/ubuntu/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /home/ubuntu/venv/lib/python3.8/site-packages/ansible
ansible collection location = /home/ubuntu/.ansible/collections:/usr/share/ansible/collections
executable location = /home/ubuntu/venv/bin/ansible
python version = 3.8.5 (default, May 27 2021, 13:30:53) [GCC 9.3.0]
jinja version = 3.0.1
libyaml = True -
ansible-lint --version
ansible-lint 5.0.12 using ansible 2.11.2
I hope to use ansible-lint with new extension as previous one is deprecated.
from vscode-ansible.
I was going to work on this, but there's already a little error popup.
If not installed:
Command failed: ansible-lint --offline --nocolor -f codeclimate "/tmp/vsc/playbook.yml"
/bin/sh: 1: ansible-lint: not found
If pointing to the ansible-lint in a venv without pointing the rest of the extension to the venv:
Command failed: ./.venv/bin/python /tmp/vsc/.venv/bin/ansible-lint --offline --nocolor -f codeclimate "/tmp/vsc/playbook.yml"
Failed to guess project directory using git:
ERROR No module named 'ansible'
FATAL: ansible-lint requires a version of Ansible package >= 2.9, but none was found. Please install a compatible version using the same python interpreter. See https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html#installing-ansible-with-pip
I think this issue already done?
from vscode-ansible.
@ssbarnea, @lilatomic This PR: ansible/ansible-language-server#5 takes care of the following issue. If there is some problem in installation or configuration of ansible-lint, it reports the user and falls back to --syntax-check.
from vscode-ansible.
The Ansible extension 0.7.1 still doesn't have ansible-lint integration working, as @yoshiotobe demonstrated above.
ansible-lint 5.3.2 using ansible 2.12.1
Update: works with extension 0.8.1 and ansible-lint 5.4.0 using ansible 2.12.3
from vscode-ansible.
Related Issues (20)
- Add document formatting feature OR set YAML extension's formatter on ansible playbooks. HOT 2
- Adopt ansible-language-server into vscode-ansible repository HOT 2
- Suggestions show all installed collections as part of 'ansible.builtin' HOT 1
- Improve Ansible LSP Docs for Vim and Neovim
- RFE: Allow for right-click on a molecule scenario to run it
- chore: upgrade chai v5
- Scaffolding collection fails when the web view in used for subsequent usage
- aaa HOT 1
- ansible variable resolution with live preview HOT 1
- Code quality checklist
- easily follow imports
- Modules from collections are not recognized when COLLECTIONS_PATH is set via env var HOT 1
- Standardise the functionalities provided by ansible-creator in the extension
- Ansible-language-server npm package 1.2.2 is missing core files HOT 1
- RFE: Ability to add devcontainer/devfile files to a workspace w/o ansible-creator
- Update development documentation for the new project structure
- "Open collection" should open in new window, with a new virtual environment
- Disable create buttons in the collection and project creation web-views during the scaffolding process
- Hung up remote session keeps running at 100% CPU HOT 3
- [error] Error: ENOENT: no such file or directory, stat - with temp pyc files
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vscode-ansible.