mirror of https://github.com/ansible/ansible.git
hashi_vault: Get token from env var or file
This allows getting the Vault token from the `VAULT_TOKEN` env var or from the file `$HOME/.vault-token`, as both of these are understood by the Vault CLI and are a common place to put Vault tokens. This allows avoiding hard-coding a Vault token into playbooks or having to include lookups. `HOME/.vault-token` is nice because a user can authenticate with the CLI using `vault auth` and then the token will be stored in `$HOME/.vault-token`. If we read this file, then we allow someone to do `vault auth` "out of band" to set up Vault access.pull/21677/head
parent
aae1a00d7e
commit
e2e4a69425
Loading…
Reference in New Issue