Split gpg-agent config by profile

This commit is contained in:
Fabio Scotto di Santolo
2026-04-08 14:54:05 +02:00
parent 044146a4bc
commit c7c3cff31f
10 changed files with 69 additions and 3 deletions

View File

@@ -12,14 +12,20 @@ profile_packages:
- dmidecode - dmidecode
- dosfstools - dosfstools
- gh - gh
- gnupg
- gpg-agent
- netcat-openbsd - netcat-openbsd
- openssh-server - openssh-server
- parted - parted
- pciutils - pciutils
- pinentry-curses
- ranger - ranger
- rsync - rsync
server_dotfiles: server_dotfiles:
- src: .gnupg/gpg-agent.conf
dest: .gnupg/gpg-agent.conf
mode: "0600"
- src: .gitignore_global - src: .gitignore_global
dest: .gitignore_global dest: .gitignore_global
mode: "0644" mode: "0644"
@@ -42,6 +48,10 @@ server_templates:
no_log: true no_log: true
server_directories: server_directories:
- path: "{{ server_user_home }}/.gnupg"
owner: "{{ server_username }}"
group: "{{ server_user_group }}"
mode: "0700"
- path: "{{ server_container_stack_dir }}" - path: "{{ server_container_stack_dir }}"
owner: root owner: root
group: root group: root

View File

@@ -19,9 +19,6 @@ workstation_user_directories:
mode: "0700" mode: "0700"
workstation_dotfiles: workstation_dotfiles:
- src: .gnupg/gpg-agent.conf
dest: .gnupg/gpg-agent.conf
mode: "0600"
- src: .gitignore_global - src: .gitignore_global
dest: .gitignore_global dest: .gitignore_global
mode: "0644" mode: "0644"

View File

@@ -3,6 +3,7 @@ enabled_services:
- docker - docker
workstation_dev_wsl_packages: workstation_dev_wsl_packages:
- pinentry-curses
- python3-pip - python3-pip
workstation_dev_wsl_excluded_packages: workstation_dev_wsl_excluded_packages:
- pcscd - pcscd
@@ -19,3 +20,7 @@ workstation_dev_wsl_python_packages:
- pypsrp - pypsrp
- pyspnego - pyspnego
workstation_wsl_systemd_enabled: true workstation_wsl_systemd_enabled: true
workstation_dev_wsl_dotfiles:
- src: .gnupg/gpg-agent.conf
dest: .gnupg/gpg-agent.conf
mode: "0600"

View File

@@ -13,6 +13,11 @@ workstation_host_linux_packages:
- podman-compose - podman-compose
- yubikey-manager - yubikey-manager
workstation_host_linux_dotfiles:
- src: .gnupg/gpg-agent.conf
dest: .gnupg/gpg-agent.conf
mode: "0600"
workstation_manage_google_chrome: true workstation_manage_google_chrome: true
workstation_removed_snap_packages: workstation_removed_snap_packages:

View File

@@ -1,4 +1,16 @@
--- ---
- name: Copy workstation WSL dotfiles
tags: [dotfiles, dotfiles:workstation, wsl]
ansible.builtin.copy:
src: "{{ playbook_dir }}/../dotfiles/workstation_dev_wsl/{{ item.src }}"
dest: "{{ user_home }}/{{ item.dest }}"
owner: "{{ username }}"
group: "{{ user_group }}"
mode: "{{ item.mode }}"
loop: "{{ workstation_dev_wsl_dotfiles | default([]) }}"
loop_control:
label: "{{ item.dest }}"
- name: Ensure WSL boot configuration file exists - name: Ensure WSL boot configuration file exists
tags: [packages, services] tags: [packages, services]
ansible.builtin.file: ansible.builtin.file:

View File

@@ -1,4 +1,16 @@
--- ---
- name: Copy workstation host Linux dotfiles
tags: [dotfiles, dotfiles:workstation, gnome]
ansible.builtin.copy:
src: "{{ playbook_dir }}/../dotfiles/workstation_host_linux/{{ item.src }}"
dest: "{{ user_home }}/{{ item.dest }}"
owner: "{{ username }}"
group: "{{ user_group }}"
mode: "{{ item.mode }}"
loop: "{{ workstation_host_linux_dotfiles | default([]) }}"
loop_control:
label: "{{ item.dest }}"
- name: Ensure GNOME extension directories exist - name: Ensure GNOME extension directories exist
tags: [packages, gnome] tags: [packages, gnome]
ansible.builtin.file: ansible.builtin.file:

View File

@@ -0,0 +1,4 @@
enable-ssh-support
pinentry-program /usr/bin/pinentry-curses
default-cache-ttl 600
max-cache-ttl 7200

View File

@@ -0,0 +1,17 @@
case "$(uname -r 2>/dev/null)" in
*[Mm]icrosoft*) ;;
*) return ;;
esac
command -v gpgconf >/dev/null 2>&1 || return
if tty -s; then
export GPG_TTY="$(tty)"
fi
gpgconf --launch gpg-agent >/dev/null 2>&1
export SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)"
if [ -n "${GPG_TTY-}" ]; then
gpg-connect-agent updatestartuptty /bye >/dev/null 2>&1
fi

View File

@@ -0,0 +1,4 @@
enable-ssh-support
pinentry-program /usr/bin/pinentry-curses
default-cache-ttl 600
max-cache-ttl 7200