Closed yaegassy closed 2 years ago
I got the same error when I installed only ansible
in a virtual environment (venv).
I was able to install ansible-lint
and it worked fine.
I feel like there is something wrong with ansible-language-server's ansible-lint
auto-detection handling...
First, the syntax check of ansible-playbook seems to be running. Apparently, from this code, ansible's path setting is very important (full path?).
REF: https://github.com/ansible/ansible-language-server/blob/main/src/services/ansiblePlaybook.ts#L66-L71
// ...snip
const [command, env] = withInterpreter(
`${settings.ansible.path}-playbook`,
`${docPath} --syntax-check`,
settings.python.interpreterPath,
settings.python.activationScript
);
// ...snip
Up to now, we have only had to set the path to the appropriate python interpreter, but from now on, we will also need to set the PATH of the ansible, ansible-lint commands.
Check with 0.2.2-beta
of @ansible/ansible-language-server
.
It worked fine with the built-in installed tools.
This seems to be a known bug, so I will close this issue.
https://github.com/yaegassy/coc-ansible/issues/2#issuecomment-946657389
I tried
ansible-language-server
on "master" since there is no new version released on npm yet.This error occurs in
coc-ansible
.Capture:
If you have created a virtual environment, activated it, and installed ansible (ansible-playbook is included) and ansible-lint on it, it will work.
I don't know if this is a bug in ansible-language-server.
If the situation does not change in the next official release, we will unfortunately remove the "built-in installation feature" of
coc-ansible
.