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: void:
hosts: hosts:
ikaros: ikaros:
ansible_connection: local
nymph: nymph:
ansible_connection: local ansible_connection: local
ubuntu_workstation: ubuntu_workstation:
hosts: hosts:
deadalus: deadalus:
ansible_connection: local
ubuntu_server: ubuntu_server:
hosts: hosts:
prometheus: prometheus:
ansible_connection: local

View File

@@ -18,14 +18,14 @@
ansible.builtin.lineinfile: ansible.builtin.lineinfile:
path: /etc/pam.d/login path: /etc/pam.d/login
insertafter: '^auth\s+include\s+system-local-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 state: present
- name: Enable gnome-keyring PAM session hook - name: Enable gnome-keyring PAM session hook
ansible.builtin.lineinfile: ansible.builtin.lineinfile:
path: /etc/pam.d/login path: /etc/pam.d/login
insertafter: '^session\s+include\s+system-local-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 state: present
- name: Copy i3 config - name: Copy i3 config
@@ -75,3 +75,19 @@
owner: "{{ username }}" owner: "{{ username }}"
group: "{{ user_group }}" group: "{{ user_group }}"
mode: "0644" 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