add ssh-agent service

This commit is contained in:
Pim Kunis 2023-02-22 22:04:05 +01:00 committed by Gitea
parent 0048372069
commit 401973a0bb
10 changed files with 61 additions and 18 deletions

View file

@ -1,36 +0,0 @@
[General]
ConfigVersion=1
[Browser]
CustomProxyLocation=
Enabled=true
[FdoSecrets]
Enabled=false
[GUI]
MinimizeOnClose=true
MinimizeOnStartup=true
ShowTrayIcon=true
TrayIconAppearance=colorful
[KeeShare]
Active="<?xml version=\"1.0\"?>\n<KeeShare xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">\n <Active/>\n</KeeShare>\n"
Foreign="<?xml version=\"1.0\"?>\n<KeeShare xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">\n <Foreign/>\n</KeeShare>\n"
Own="<?xml version=\"1.0\"?>\n<KeeShare xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">\n <PrivateKey/>\n <PublicKey/>\n</KeeShare>\n"
QuietSuccess=true
[PasswordGenerator]
AdditionalChars=
AdvancedMode=false
ExcludedChars=
Length=40
SpecialChars=false
UpperCase=true
[SSHAgent]
Enabled=true
[Security]
ClearClipboardTimeout=30
ClearSearch=false

View file

@ -1,3 +1,5 @@
AddKeysToAgent yes
Host brussels
HostName brussels.studlab.os3.nl
User pkunis

View file

@ -19,14 +19,6 @@
template:
src: "{{ role_path }}/templates/.gitconfig.j2"
dest: ~/.gitconfig
- name: Create keepassxc config directory
file:
path: ~/.config/keepassxc
state: directory
- name: Copy keepassxc.ini
copy:
src: "{{ role_path }}/files/keepassxc.ini"
dest: ~/.config/keepassxc/keepassxc.ini
- name: Create repos directory
file:
path: ~/repos
@ -57,3 +49,13 @@
src: "{{ role_path }}/files/ssh_config"
dest: ~/.ssh/config
mode: 0600
- name: Copy systemd ssh-agent service
template:
src: "{{ role_path }}/templates/ssh-agent.service.j2"
dest: /etc/systemd/user/ssh-agent.service
- name: Enable ssh-agent service
systemd:
name: ssh-agent
enabled: true
scope: user
state: started

View file

@ -0,0 +1,10 @@
[Unit]
Description=SSH key agent
[Service]
Type=simple
Environment=SSH_AUTH_SOCK={{ ssh_agent_socket }}
ExecStart=/usr/bin/ssh-agent -D -a $SSH_AUTH_SOCK
[Install]
WantedBy=default.target