shaded-enmity / ansible-schema-generator

Generate JSON schema for language servers from Ansible module documentation
GNU General Public License v3.0
35 stars 8 forks source link

Playbooks are not supported #6

Open nkakouros opened 5 years ago

nkakouros commented 5 years ago

I am trying to use this schema with yaml-language-server. After setting everything up, I create a new yml file and start editing it. I want this file to be a playbook:

- hosts: all
  tasks:
    - apt:

The first issue is that I get no completions for the tasks. Then, hosts complains that it needs a shell property. From what I understand the schema file supports only yml files with tasks and not playbooks. Is this the case? If so, can playbook support be added? Is there an existing workaround?

shaded-enmity commented 5 years ago

@tterranigma Functionality-wise work on #5 should enable this as well. The main problem here is to find reasonable pivot element (or a file name pattern) for which we can trigger this "enhanced" schema validation.

I might have some time to look into this on the weekend, will you be able to help me with testing once I have something testable?

nkakouros commented 5 years ago

@shaded-enmity Sure! Just let me know when I can try it!

bigjazzsound commented 5 years ago

I'm also willing to test once this becomes available.

nkakouros commented 4 years ago

@shaded-enmity Should you find the time to work on this during Christmas, I would be glad to test out.