VSChina / vscode-ansible

VSCode extension for ansible
Other
77 stars 48 forks source link

unknown tag <!unsafe> #240

Open nicolas-marcq opened 5 years ago

nicolas-marcq commented 5 years ago

Environment

Summary

error unknown tag <!unsafe>

Reproduce steps

Create a variable like

restserver_allow_blob_url_regex_list: !unsafe |
  '["^https://[a-z0-9]{3,63}\\.blob\\.core\\.windows\\.net/"]'

Expected Results

The tag should be recognized like described in the doc

Actual Results

image

megakoresh commented 4 years ago

One workaround is to disable yaml validation in this plugin with ansible.validation: false and install language server for yaml from redhat, and add !unsafe as a custom tag to the LSP setting: "yaml.customTags": ["!unsafe"]

This extension uses the language server anyway under the hood.

sean-m-sullivan commented 1 year ago

Run into this, I use unsafe all the time for passing yaml templates to an API, it should be built into the vscode ansible.