ansible/ansible-vault-pass.sh
2021-03-14 20:31:12 +01:00

8 lines
257 B
Bash
Executable File

#!/bin/bash
BW_VAULT_ENTRY_ID="ansible vault"
if [[ -z ${BW_SESSION:-} ]] ; then
>&2 echo '$BW_SESSION not found! - You need to login to the vault'
BW_SESSION=$(bw unlock --raw)
fi
bw get password ${BW_VAULT_ENTRY_ID} --session ${BW_SESSION} --raw