vscode-ansible icon indicating copy to clipboard operation
vscode-ansible copied to clipboard

No autocomplete for roles

Open Igorgro opened this issue 2 years ago • 1 comments

Sanity check

  • [X] I certify that the redhat.ansible extension is in use and the language of the document in this bug report shows up as Ansible

Summary

When I'm trying to import role at the play level (according to documentation https://docs.ansible.com/ansible/latest/user_guide/playbooks_reuse_roles.html#using-roles-at-the-play-level), there is no autocomplete available, see screenshots:

image

image

while the roles are present in roles/ directory near the playbook.

(second screenshot demonstrates strings suggestion window which is shown when no LSP-specific suggestions available)

Extension version

0.13.59

VS Code version

1.70.2

Ansible Version

ansible [core 2.13.3]
  config file = /home/igormahov/dev/ansible/miem/collection/ansible.cfg
  configured module search path = ['/home/igormahov/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3.10/site-packages/ansible
  ansible collection location = /home/igormahov/.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/bin/ansible
  python version = 3.10.6 (main, Aug  3 2022, 17:39:45) [GCC 12.1.1 20220730]
  jinja version = 3.1.2
  libyaml = True

OS / Environment

Arch Linux

Relevant log output

No response

Igorgro avatar Sep 01 '22 15:09 Igorgro

Adding to this, autocomplete for role is great, autocomplete for role arguments as made available by argument_specs.yml would be awesome!

ansible already provides anything required in ansible-doc (ansible-doc -t role -l, ansible-doc -t role -j <role>).

bendem avatar Oct 12 '22 13:10 bendem