Added GPG agent configuration

This commit is contained in:
Fabio Scotto di Santolo
2026-03-16 11:51:49 +01:00
parent f36c2b5617
commit d990d86cbe
3 changed files with 24 additions and 2 deletions

View File

@@ -3,13 +3,16 @@ all:
void:
hosts:
ikaros:
ansible_connection: local
nymph:
ansible_connection: local
ubuntu_workstation:
hosts:
deadalus:
ansible_connection: local
ubuntu_server:
hosts:
prometheus:
ansible_connection: local

View File

@@ -18,14 +18,14 @@
ansible.builtin.lineinfile:
path: /etc/pam.d/login
insertafter: '^auth\s+include\s+system-local-login$'
line: 'auth optional pam_gnome_keyring.so'
line: "auth optional pam_gnome_keyring.so"
state: present
- name: Enable gnome-keyring PAM session hook
ansible.builtin.lineinfile:
path: /etc/pam.d/login
insertafter: '^session\s+include\s+system-local-login$'
line: 'session optional pam_gnome_keyring.so auto_start'
line: "session optional pam_gnome_keyring.so auto_start"
state: present
- name: Copy i3 config
@@ -75,3 +75,19 @@
owner: "{{ username }}"
group: "{{ user_group }}"
mode: "0644"
- name: Ensure .gnupg directory exists
ansible.builtin.file:
path: "{{ user_home }}/.gnupg"
state: directory
owner: "{{ username }}"
group: "{{ user_group }}"
mode: "0700"
- name: Copy gpg-agent.conf
ansible.builtin.copy:
src: "{{ playbook_dir }}/../dotfiles/desktop/.gnupg/gpg-agent.conf"
dest: "{{ user_home }}/.gnupg/gpg-agent.conf"
owner: "{{ username }}"
group: "{{ user_group }}"
mode: "0600"

View File

@@ -0,0 +1,3 @@
enable-ssh-support
default-cache-ttl 600
max-cache-ttl 7200