jhaals / ansible-vault

ansible lookup plugin for secrets stored in Vault(by HashiCorp)
BSD 3-Clause "New" or "Revised" License
347 stars 65 forks source link

Added ok_if_missing option #63

Closed brunopsoares closed 6 years ago

brunopsoares commented 6 years ago

If the key which we're looking for does not exists, we get an exception. We can pass an option "vault_ok_if_missing" or set an environment variable "VAULT_OK_IF_MISSING" to true to get an empty value. Example to get a default value: {{ lookup('vault', '/secret/key', 'value') | default('bla', true) }}