Make pinentry program a templated variable.

This commit is contained in:
Tom Alexander 2022-10-27 01:34:06 -04:00
parent 07f1b0a20f
commit 87570eba79
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE
3 changed files with 22 additions and 9 deletions

View File

@ -1,7 +0,0 @@
enable-ssh-support
write-env-file
use-standard-socket
default-cache-ttl 600
max-cache-ttl 7200
display :0
pinentry-program pinentry-qt5

View File

@ -19,11 +19,20 @@
loop:
- src: gpg.conf
dest: .gnupg/gpg.conf
- src: gpg-agent.conf
dest: .gnupg/gpg-agent.conf
- src: scdaemon.conf
dest: .gnupg/scdaemon.conf
- name: Copy templates
template:
src: "templates/{{ item.src }}.j2"
dest: "{{ account_homedir.stdout }}/{{ item.dest }}"
mode: 0600
owner: "{{ account_name.stdout }}"
group: "{{ group_name.stdout }}"
loop:
- src: gpg-agent.conf
dest: .gnupg/gpg-agent.conf
- name: Check trusted gpg keys
command: gpg --list-public-keys --keyid-format LONG
register: gpgkeys

View File

@ -0,0 +1,11 @@
enable-ssh-support
write-env-file
use-standard-socket
default-cache-ttl 600
max-cache-ttl 7200
display :0
{% if os_flavor == "linux" %}
pinentry-program /usr/bin/pinentry-qt5
{% elif os_flavor == "freebsd" %}
pinentry-program /usr/local/bin/pinentry-qt5
{% endif %}