Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing property "key_value" with Ansible Set_Fact #340

Open
PhilThurston opened this issue Aug 2, 2020 · 9 comments
Open

Missing property "key_value" with Ansible Set_Fact #340

PhilThurston opened this issue Aug 2, 2020 · 9 comments

Comments

@PhilThurston
Copy link

PhilThurston commented Aug 2, 2020

Right now while using ansible for example you will get an error of MIssing Property "key_value" when using any format of the set_fact module in yaml. You can reproduce this by taking any example from https://docs.ansible.com/ansible/latest/modules/set_fact_module.html for example:

- set_fact:
    one_fact: something
    other_fact: "{{ local_var * 2 }}"
    cacheable: yes

it shouldn't be throwing that error especially since the syntax is correct.

@JPinkney
Copy link
Contributor

JPinkney commented Aug 3, 2020

Are you using any VSCode extensions that provide the ansible support? If not, you'll have to file an issue on https://github.com/SchemaStore/schemastore since its a schema issue

@pm98zz-c
Copy link

pm98zz-c commented Aug 28, 2020

I suspect this is VSChina/vscode-ansible#261.
See also VSChina/vscode-ansible#272

[EDIT]Sorry, no. I was wrong. Looks like it's the other way round.[/EDIT]

@jorhett
Copy link

jorhett commented Nov 17, 2020

@JPinkney could you please clarify what you mean by it's a bug in schemastore? There is neither a definition of YAML nor a definition of Ansible in that repo AFAICT. This is not to say that you're wrong, but can you help explain exactly what we should be opening a bug against?

@JPinkney
Copy link
Contributor

could you please clarify what you mean by it's a bug in schemastore

The ansible schema in the schemastore just isn't totally correct as far as I can tell. Since we pull in schemas from the schemastore automatically if a schema is wrong there then it will be wrong inside of VSCode as well.

I'm not sure which specific ansible schema is being used in the original issue but the schemas for ansible are located here in the repo: https://github.com/SchemaStore/schemastore/tree/master/src/schemas/json. It looks like it contains schemas for ansible 2.0 to 2.9

If you open a bug on the schema store and they end up fixing it then the changes will automatically be propagated to the extension once you restart VSCode

@jorhett
Copy link

jorhett commented Nov 18, 2020

Odd that searches for ansible in the Github repo didn't return those files :( Thanks!

@4n70w4
Copy link

4n70w4 commented Mar 3, 2021

Any news?

@ssbarnea
Copy link
Member

ssbarnea commented Mar 4, 2021

First, be sure that you have zbr.vscode-ansible installed and after that report schema bug to ansible-community/schemas repo, if those were used. For sure this repo does not have a schema in it.

@nyetwurk
Copy link

Installing zbr.vscode-ansible solved the problem for me.

@4n70w4
Copy link

4n70w4 commented Mar 28, 2021

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants