I’d like to put the private key file I ssh into many of my machines with into my repo. When I encrypt the file with the ssh-key in it using ansible-vault, I can easily edit, show etc. the file with ansible-vault when I provide a vault_password_file in the ansible.cfg.
However, when trying to run a playbook with the same ansible.cfg, it always prompts me for the password again. So the commands I run:
ansible-vault show keys/mykey.pem //works fine like that, because password is provided in a vault_password_file
ansible-playbook -i contrib/inventory/ec2.py myplaybook.yml //suddenly prompts me with 'Enter passphrase for key 'keys/mykey.pem". When I enter the password, it is rejected.
Anybody know what’s going on there?