Search code examples
gitansiblegit-diffgit-logansible-vault

I keep getting a password prompt when I try to git-log an ansible-vault file


I followed the instruction here:

How to diff ansible vault changes?

but I keep getting a prompt to put in the ansible-vault password.

This is the command I run that prompts for the vault password:

git log -p staging.yml

What am I doing wrong? I tried putting in the the pager as cat and less like the comments show and it still prompts for the vault password...can someone tell me what I am doing wrong? I am using mac os x sierra...


Solution

  • You have to set vault_password_file config option or ANSIBLE_VAULT_PASSWORD_FILE environment variable to point to your vault password file.

    In case of answer you linked to, it should be:

    vault_password_file = .vault_password