Missing property "key_value" with Ansible Set_Fact
See original GitHub issueRight 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.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:20
- Comments:9 (3 by maintainers)
Top Results From Across the Web
set_fact - Missing property "key_value" · Issue #261
VS Code wrongly shows an error where set_fact is properly formatted and it doesn't need a "key_value" property. Reproduce steps. - name: Load...
Read more >Ansible - How to keep appending new keys to a dictionary ...
I want a single dictionary with all the keys. Code: --- - hosts: localhost connection: local vars: some_value: 12345 dict: {} tasks: -...
Read more >ansible.builtin.set_fact module – Set host variable(s) and ...
The set_fact module takes key=value pairs or key: value (YAML notation) as variables to set in the playbook scope. The 'key' is the...
Read more >Changing a deeply-nested dict variable in an Ansible ...
- name: Change animals.birds.cardinals.feathers to "red". set_fact: animals: "{{ animals|combine({'birds': {'cardinals ...
Read more >Is there a way to check that a dictionary key is not defined ...
The error was: error while evaluating conditional (me.cool): 'dict object' has no attribute 'cool'. ansible · ansible-playbook · conditional.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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
https://marketplace.visualstudio.com/items?itemName=zbr.vscode-ansible