Skip to content

Instantly share code, notes, and snippets.

@xbalaji
Created March 24, 2018 03:19
Show Gist options
  • Save xbalaji/63ad4669ead7638930e94e02dc221c58 to your computer and use it in GitHub Desktop.
Save xbalaji/63ad4669ead7638930e94e02dc221c58 to your computer and use it in GitHub Desktop.
ansible-vault-pass
use the technique described in http://docs.ansible.com/ansible/latest/config.html#default-vault-password-file
create a file: vault-pass.sh
cat > vault-pass.sh << EOF
#! /bin/bash
echo $ANSIBLE_VAULT_PASSWORD
EOF
chmod +x vault-pass.sh
export ANSIBLE_VAULT_PASSWORD='yourpassword'
export ANSIBLE_VAULT_PASSWORD_FILE=/vault-pass.sh
now try:
ansible-vault view encrypted.yml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment