VSCode ansible-vault-inline extension
VSCode extensions to encrypt/decrypt ansible-vault
file as well as selected text. Can toggle with ctl+alt+0
, on macOS with cmd+alt+0
, or via the contextual menu.
Fork of dhoeric/vscode-ansible-vault, which in turn was inspired by sydro/atom-ansible-vault
Usage
To read vault password file in your computer, you can specify the vault_password_file
in ansible.cfg or through extension settings.
Experimental: Vault ID
You can use vault_identity_list
in ansible.cfg or through extension settings, e.g. dev@path/to/dev.key, prod@path/to/prod.key
instead of vault password, drop-down box with a list of your vault identities will appear during encryption.
To memorize encrypt-vault-id, use ansibleVaultInline.encryptVaultId
setting or ctl+alt+=
, on macOS cmd+alt+=
, that's the way you can switch between vault IDs. To reset this setting and back to default mode (ask vault id before encryption) you can use cmd+alt+-
To learn more about Vault IDs, please read RH learn article or official Ansible docs.
Requirements
Extension Settings
This extension contributes the following settings:
ansibleVaultInline.executable
: Full path of ansible-vault executable (e.g. /usr/local/bin/ansible-vault
)
ansibleVaultInline.keyfile
: Ansible-vault password file path or vaul id list (e.g. ~/.vault-pass.txt
or dev@~/dev.key, prod@~/prod.key
)
ansibleVaultInline.keypass
: Ansible-vault password text (e.g. GT6rAP7rxYzeFC1KtHVW
)
ansibleVaultInline.encryptVaultId
: Ansible vault ID used for encryption by default (e.g. dev
)
Developement
Build
npm install
npm run compile
Publish
npm version [major|minor|patch] --no-git-tag-version
- Update
CHANGELOG.md
- Publish the extension. See documentation for more info on how to login and for more advance options: VSCode: Publishing Extension.
vsce publish --pat X_PERSONAL_ACCESS_TOKEN_X
git tag x.x.x
git push origin x.x.x
- Create a release in Gitlab
curl --header 'Content-Type: application/json' --header "PRIVATE-TOKEN: X_ACCESS_TOKEN_X" --data '{ "name": "Release x.x.x", "tag_name": "x.x.x", "description": "# CHANGELOG\n## [x.x.x] - 2019-10-21\n### Added\n- Initial release" }' --request POST https://gitlab.com/api/v4/projects/14922723/releases