Hi Ansible users,

I've been trying to use vault lately but I got tired of having to enter my
passphrase every time I ran ansible-playbook.  I didn't want to put my
passphrase into a file on disk, either.  Luckily, the next major release of
Ansible will include the ability for vault_password_file to point at a
script that will be run to get your passphrase.[1]  Using this new
functionality I wrote a tiny vault_password_file script that reads your
passphrase via gpg-agent.  gpg-agent will then cache that passphrase for
you (by default) so you won't have to enter it every time you run an
Ansible command.

I thought others might find this useful.  If so, the script can be found at:
https://github.com/dsedivec/ansible-plugins/blob/master/vault_from_gpg_agent.py

To reiterate, as of right now I believe this will only work with Ansible
from the Git devel branch.

If an Ansible maintainer thinks this has a place in some more official
repository somewhere I'm happy to make a pull request, just give me a hint
where it should go.

Regards,
Dale

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAEj9N4LwfbYg-PVAPTwmn1WP%3DCaYefPU48vY05XS3QxBWyFuUQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to