ansible / vscode-ansible

vscode/vscodium extension for providing Ansible auto-completion and integrating quality assurance tools like ansible-lint, ansible syntax check, yamllint, molecule and ansible-test.
https://ansible.readthedocs.io/projects/vscode-ansible/
MIT License
363 stars 92 forks source link

PATH is not populated with virtualenv paths #428

Closed rdbisme closed 2 years ago

rdbisme commented 2 years ago

Sanity check

Summary

  1. I install ansible within a virtualenv (using poetry).
  2. I correctly select the Python interpreter for the workspace from the virtualenv
  3. Opening a terminal correctly select the right virtualenv
  4. The Ansible Server PATH does not contain virtualenv paths.

Extension version

v0.7.1

VS Code version

1.65.0-insider

Ansible Version

ansible [core 2.12.1]
  config file = /home/rdb/git/rdb.is/ansible-zanarkand/ansible.cfg
  configured module search path = ['/home/rdb/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /home/rdb/.envs/ansible-zanarkand-2f8pt8Q7-py3.9/lib/python3.9/site-packages/ansible
  ansible collection location = /home/rdb/.ansible/collections:/usr/share/ansible/collections
  executable location = /home/rdb/.envs/ansible-zanarkand-2f8pt8Q7-py3.9/bin/ansible
  python version = 3.9.10 (main, Feb 12 2022, 12:09:17) [GCC 11.1.0]
  jinja version = 3.0.3
  libyaml = True

OS / Environment

Windows 11, WSL2, Archlinux

Relevant log output

which: no ansible-lint in (/home/rdb/git/rdb.is/bin:/home/rdb/.vscode-server-insiders/bin/97c1e76d668d23d568044feb31083407f4c4b1ed/bin/remote-cli:/home/rdb/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/lib/wsl/lib:/mnt/c/Python310/Scripts/:/mnt/c/Python310/:/mnt/c/Python39/Scripts/:/mnt/c/Python39/:/mnt/c/Windows/system32:/mnt/c/Windows:/mnt/c/Windows/System32/Wbem:/mnt/c/Windows/System32/WindowsPowerShell/v1.0/:/mnt/c/Windows/System32/OpenSSH/:/mnt/c/Program Files (x86)/Adobe/Acrobat Reader DC/Reader:/mnt/c/Program Files/WireGuard/:/mnt/c/Program Files/MiKTeX/miktex/bin/x64/:/mnt/c/tools/Strawberry/c/bin:/mnt/c/tools/Strawberry/perl/site/bin:/mnt/c/tools/Strawberry/perl/bin:/mnt/c/WINDOWS/system32:/mnt/c/WINDOWS:/mnt/c/WINDOWS/System32/Wbem:/mnt/c/WINDOWS/System32/WindowsPowerShell/v1.0/:/mnt/c/WINDOWS/System32/OpenSSH/:/mnt/c/Program Files (x86)/Tailscale IPN:/mnt/c/Users/ruben/scoop/apps/python/current/Scripts:/mnt/c/Users/ruben/scoop/apps/python/current/:/mnt/c/Users/ruben/scoop/apps/vscode-insiders/current/bin:/mnt/c/Users/ruben/scoop/shims:/mnt/c/Users/ruben/AppData/Local/Microsoft/WindowsApps:/mnt/c/Program Files (x86)/DjVuLibre:/mnt/c/Users/ruben/AppData/Local/SumatraPDF:/mnt/c/Program Files/Oracle/VirtualBox:/mnt/c/Program Files/qemu:/mnt/c/Program Files/gs/gs9.53.3/bin:/mnt/c/Program Files/gs/gs9.53.3/lib:/mnt/c/tools/neovim/Neovim/bin:/mnt/c/tools/msys64:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/home/rdb/.yarn/bin)
ssbarnea commented 2 years ago

Please upgrade to 0.8.1 and ansible-lint 5.4.0 or newer. Read https://github.com/ansible-community/ansible-lint/releases/tag/v5.4.0 to understand that the fix was needed inside the linter.