summaryrefslogtreecommitdiff
path: root/roles/ssh/tasks
diff options
context:
space:
mode:
Diffstat (limited to 'roles/ssh/tasks')
-rw-r--r--roles/ssh/tasks/main.yml33
1 files changed, 33 insertions, 0 deletions
diff --git a/roles/ssh/tasks/main.yml b/roles/ssh/tasks/main.yml
new file mode 100644
index 0000000..92d4efd
--- /dev/null
+++ b/roles/ssh/tasks/main.yml
@@ -0,0 +1,33 @@
+- name: Setup SSH directory for Dmitry Ilvokhin
+ ansible.builtin.file:
+ path: /home/d/.ssh
+ state: directory
+ owner: d
+ group: d
+ mode: u+rw,g-wx,o-rwx
+
+- name: Update authorized_keys for Dmitry Ilvokhin
+ ansible.posix.authorized_key:
+ user: d
+ state: present
+ key: '{{ item }}'
+ with_file:
+ - misc/pubkeys/d.pub
+
+- name: Configure ssh for Dmitry Ilvokhin
+ ansible.builtin.template:
+ src: misc/dotfiles/ssh/config.j2
+ dest: "~{{ user }}/.ssh/config"
+ owner: "{{ user }}"
+ mode: u+rw,g-rw,o-rw
+ when:
+ - jumphost
+
+- name: Add ssh rc for Dmitry Ilvokhin
+ ansible.builtin.copy:
+ src: misc/dotfiles/ssh/rc
+ dest: "~{{ user }}/.ssh/rc"
+ owner: "{{ user }}"
+ mode: u+rwx,g-rw,o-rw
+ when:
+ - jumphost