aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--playbooks/st0dev0.rgoncalves.se.yml1
-rw-r--r--roles/sshd/tasks/main.yml8
2 files changed, 9 insertions, 0 deletions
diff --git a/playbooks/st0dev0.rgoncalves.se.yml b/playbooks/st0dev0.rgoncalves.se.yml
index b47312a..fbee649 100644
--- a/playbooks/st0dev0.rgoncalves.se.yml
+++ b/playbooks/st0dev0.rgoncalves.se.yml
@@ -10,3 +10,4 @@
- { role: cgit }
- { role: jenkins }
- { role: httpd }
+ - { role: sshd }
diff --git a/roles/sshd/tasks/main.yml b/roles/sshd/tasks/main.yml
index 8c032ee..db46aad 100644
--- a/roles/sshd/tasks/main.yml
+++ b/roles/sshd/tasks/main.yml
@@ -33,6 +33,14 @@
ignore_errors: true
loop: "{{ keys.files }}"
+- name: chown ssh file to correct user
+ file:
+ path: "/home/{{ item.path | dirname | basename }}/.ssh/authorized_keys"
+ owner: "{{ item.path | dirname | basename }}"
+ mode: 0600
+ ignore_errors: true
+ loop: "{{ keys.files }}"
+
- name: restart sshd
service:
name: sshd
remember that computers suck.