Browse Source

add recovery vault password from bitwarden

master
vincent 7 months ago
parent
commit
5f03388156
  1. 2
      README.md
  2. 7
      ansible-vault-pass.sh

2
README.md

@ -3,7 +3,7 @@
## commande ansible
***launch playbook on staging***
`ansible-playbook -i staging site.yml --vault-password-file=.vaultpassword`
`ansible-playbook -i staging site.yml --vault-password-file=./ansible-vault-pass.sh
***init new role architecture***
`ansible-galaxy user_config init `

7
ansible-vault-pass.sh

@ -0,0 +1,7 @@
#!/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
Loading…
Cancel
Save