From a0dd74445b4460e5e7fa4c72bd478348eb960224 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Romain=20Gon=C3=A7alves?= Date: Sun, 5 Dec 2021 13:07:49 +0000 Subject: roles/workstation: Generate hostnames for ssh --- roles/workstation/tasks/ssh.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 roles/workstation/tasks/ssh.yml (limited to 'roles/workstation/tasks/ssh.yml') diff --git a/roles/workstation/tasks/ssh.yml b/roles/workstation/tasks/ssh.yml new file mode 100644 index 0000000..318198e --- /dev/null +++ b/roles/workstation/tasks/ssh.yml @@ -0,0 +1,18 @@ +- name: create ssh directory + file: + path: "/home/{{ workstation_user }}/{{ item }}" + owner: "{{ workstation_user }}" + group: "{{ workstation_user }}" + state: directory + mode: 0700 + loop: + - .ssh + - .ssh/config.d + +- name: generate ssh configuration + template: + src: ssh.config.j2 + dest: "/home/{{ workstation_user }}/.ssh/config.d/dns.config" + owner: "{{ workstation_user }}" + group: "{{ workstation_user }}" + mode: 0600 -- cgit v1.2.3