# list all keys
gpg --list-keys
# create a key
gpg --gen-key
# trust key
gpg --edit-key [email protected]
trust
5
# install gpg-agent via gnupg-agent package
apt-get install gnupg-agent
# encrypt password
echo test |gpg -r [email protected] -e -o vault_passphrase.gpg
chmod 600 vault_passphrase.gpg
# define vault password file
export ANSIBLE_VAULT_PASSWORD_FILE=vault.sh
chmod 750 vault.sh
- https://www.digitalocean.com/community/tutorials/how-to-use-gpg-to-encrypt-and-sign-messages-on-an-ubuntu-12-04-vps
- https://benincosa.com/?p=3235