How to integrate ansible-lint
in venv with Ansible Language Extension¶
Background: No need to install ansible-lint system-wide¶
To make Ansible Language Extension fully function, users need to install
ansible-lint
. The easiest way to install ansible-lint
is to install it
system-wide as below:
However, installing Python packages system-wide is not always preferable because
the it affects the whole system behavior. You can install ansible-lint
in venv
with normal permission, and integrate it with Ansible Language Extension
instead.
How to use ansible-lint
in venv¶
The outline is fairly simple.
- Create a venv.
- Install
ansible-lint
in the venv. - Configure path to
ansible-lint
andansible
executables in the extension settings.