redhat-developer / redhat-developer/yaml-language-server

`Matches a schema that is not allowed` error, but the ansible-playbook script runs fine.

Open
#836 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
TypeScript
Stars
1.5k
Forks
352
Avg merge
2d 7h
Merged PRs (30d)
11

Description

Hi,

My first attempt to use ansible has been thwarted by red squiggles.

I have installed this language server and am using the Helix editor that works with it out-of-the-box. My first script works running ansible-playbook , but I am told Matches a schema that is not allowed, and I have looked at the Helix logs and it seems to be using the correct https://raw.githubusercontent.com/ansible/ansible-lint/main/src/ansiblelint/schemas/ansible.json

- name: Bootstrap development environment
  hosts: localhost

  tasks:
  - name: Install Stow on redhat clones
    become: true
    dnf:
      name:
        - stow
      state: present

Screenshot from 2023-01-20 16-48-36
Screenshot from 2023-01-20 16-50-07

What exactly does this message mean? It doesn't really make sense, does it mean ansible.json is not allowed? What can I do about this problem? I would like it to help me with ansible.

Also I have no formatting available, it is turned of by default? That would be a strange choice? Cheers.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the sample YAML in Helix and inspecting the language-server logs and the referenced ansible.json schema. Determine why the valid ansible-playbook input is rejected and whether the formatting concern is a separate issue; done means the sample produces no incorrect schema diagnostic and the intended formatting behavior is documented or corrected.

Written by the indexing model from the issue text.

Assessment

Tech stack
yaml
Domain
devtools, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.