vscode-ansible
vscode-ansible copied to clipboard
ansible extension doesn't recognize podman installed on the system
Summary
i enabled "*Execution Environment" , *and selected podman, it throws an error 'Error: Command failed: command -v podman', But infact
i have podman installed and available in default PATH. (/usr/bin/podman)
Extension version
v2.3.7
VS Code version
Version: 1.78.
Ansible Version
ansible [core 2.13.8]
config file = /etc/ansible/ansible.cfg
configured module search path = ['/home/mniranja/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /home/mniranja/venv38/lib/python3.8/site-packages/ansible
ansible collection location = /home/mniranja/.ansible/collections:/usr/share/ansible/collections
executable location = /home/mniranja/venv38/bin/ansible
python version = 3.8.16 (default, Dec 21 2022, 10:58:32) [GCC 8.5.0 20210514 (Red Hat 8.5.0-17)]
jinja version = 3.1.2
libyaml = True
OS / Environment
RHEL 8.8
Relevant log output
No response
Send us the output of command -v podman
, also the output of echo $PATH
.
Please run the above commands from vscode terminal.
From my Bash terminal
(venv) [mniranja@mniranja ~]$ command -v podman
/usr/bin/podman
(venv) [mniranja@mniranja ~]$ echo $PATH
/home/mniranja/venv/bin:/home/mniranja/.local/bin:/home/mniranja/bin:/home/mniranja/.local/bin:/home/mniranja/bin:/home/mniranja/.local/bin:/home/mniranja/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/home/mniranja/go/bin:/home/mniranja/go/bin:/home/mniranja/go/bin
(venv) [mniranja@mniranja ~]$
From vscode terminal
sh-5.1$ echo $PATH
/app/bin:/app/bin:/app/bin:/usr/bin:/home/mniranja/.var/app/com.visualstudio.code/data/node_modules/bin
[476 preload-host-spawn-strategy] Warning: waitpid override ignores groups
sh-5.1$ echo $PATH
/app/bin:/app/bin:/app/bin:/usr/bin:/home/mniranja/.var/app/com.visualstudio.code/data/node_modules/bin
sh-5.1$ command -v podman
sh-5.1$
I have to mention here that vscode was installed using flathub repository
@mrniranjan The /usr/bin in flatpak is coming from the runtime. The host one is accessible via /run/host/usr/bin, however the proper way to invoke commands from the host is using flatpak-spawn --host from within the flatpak sandbox.
Folks, is there a way to change the command the plugin uses to invoke podman so I can configure it properly for the sandboxed environment?
On that point, I'm trying to figure out how to use this in Silverblue. The flatpak version of vscode includes the command /app/tools/podman/bin/podman-remote, which I can't execute from the ansible extension.