gnupg: let ssh update GPG_TTY on every run

This commit is contained in:
Hoang Nguyen 2024-02-12 00:00:00 +07:00
parent cef0cc50cd
commit 6391745de2
Signed by: folliehiyuki
GPG Key ID: B0567C20730E9B11
2 changed files with 19 additions and 0 deletions

View File

@ -24,6 +24,7 @@ Plans for the future of this dotfiles.
- [ ] mangal
- [ ] musikcube
- [ ] vimiv-qt
- [ ] mpd-mpris (as an alternative to mpDris2)
## Cosmetic

View File

@ -14,3 +14,21 @@
loop:
- gpg
- gpg-agent
- name: gnupg | Update SSH config
when: ssh_client == 'openssh'
block:
- name: gnupg | Ensure ~/.ssh directory exists
file:
path: ~/.ssh
mode: '700'
state: directory
- name: gnupg | Configure ssh to update TTY value for GPG on each run
lineinfile:
path: ~/.ssh/config
mode: '644'
create: true
search_string: gpg-connect-agent UPDATESTARTUPTTY
line: Match host * exec "gpg-connect-agent UPDATESTARTUPTTY /bye"
insertbefore: BOF