Vscode-yaml: Support Ansible Vault

Created on 16 Jun 2018  路  4Comments  路  Source: redhat-developer/vscode-yaml

Example:

my_password: !vault |
          $ANSIBLE_VAULT;1.1;AES256
          39653336346665613935363862356664346130383931636636323730613563396234663236373132
          3534306662363535646330636262323134623730656235620a316466656236616261323063663032
          35303032613061383162616639306634323862646133303035303639613136623166343662333630
          6130383630323538350a393162343364656431373231636232386664666536393133326539393061
          3235

This is the default. I generally use just two spaces of indentation, though.

Most helpful comment

Try adding !vault to yaml.customTags (like this).

"yaml.customTags": [
    "!vault"
]

I think that should resolve the unknown tag issue!

All 4 comments

I'm not exactly sure what the issue is here. Do you just want 2 spaces of indentation instead of the default? Or is there something else?

Lol, no! I get a red line underneath !vault, and a popup written unknown tag <!vault>. I just mentioned that I use less indentation than the one output by ansible-vault, if that makes any difference!

Try adding !vault to yaml.customTags (like this).

"yaml.customTags": [
    "!vault"
]

I think that should resolve the unknown tag issue!

Thank you, that works!

Was this page helpful?
0 / 5 - 0 ratings