Browse Source

make ssh-agent usable

master
parent
commit
fcb11bfba4
3 changed files with 27 additions and 0 deletions
  1. +1
    -0
      files/pam_env.conf
  2. +2
    -0
      files/ssh-agent.service.d.install
  3. +24
    -0
      tasks/main.yaml

+ 1
- 0
files/pam_env.conf View File

@@ -0,0 +1 @@
SSH_AUTH_SOCK DEFAULT="${XDG_RUNTIME_DIR}/openssh_agent"

+ 2
- 0
files/ssh-agent.service.d.install View File

@@ -0,0 +1,2 @@
[Install]
WantedBy=default.target

+ 24
- 0
tasks/main.yaml View File

@@ -1,8 +1,11 @@
---
- apt:
pkg:
- openssh-client
- ssh-agent-filter
- gnupg
- gnupg-agent
- agent-transfer
- mtr
- p7zip
- zip
@@ -13,3 +16,24 @@
- name: jpath - JMESPath exploration tool in the terminal
pip:
name: jmespath-terminal

- name: make ssh-agent user service override directory
file:
path: /etc/systemd/user/ssh-agent.service.d
state: directory

- name: make ssh-agent user service enableable
copy:
src: ssh-agent.service.d.install
dest: /etc/systemd/user/ssh-agent.service.d/install.conf

- name: ensure ssh-agent user service is enabled for all users
systemd:
enabled: yes
scope: global
name: ssh-agent.service

- name: pam_env.conf
copy:
src: pam_env.conf
dest: /etc/security/pam_env.conf