Starting to convert to playbook: Added gnupg role

This commit is contained in:
2019-03-16 08:44:22 +01:00
parent 8d40aa6e63
commit 35e5df830f
8 changed files with 85 additions and 0 deletions

14
roles/gnupg/files/gnupg_agent Executable file
View File

@ -0,0 +1,14 @@
#!/bin/bash
rc=$(pgrep gpg-agent)
if [ "$rc" != 0 ]; then
export GPG_AGENT_INFO
export SSH_AUTH_SOCK
export SSH_AGENT_PID
else
eval $(gpg-agent --daemon)
fi
gpg-connect-agent /bye
export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)