commit 58ca7b0a6686823df9cc824c2c1544e2dffd06f5
parent 40fb07e60d8f886d019a4c7396518e484ad676cc
Author: Andreas Gruhler <andreas.gruhler@adfinis.com>
Date: Wed, 4 Oct 2023 12:31:11 +0200
Merge pull request #1 from in0rdr/fix/ssh-dir-perm
fix: ssh user dir permissions
Diffstat:
1 file changed, 10 insertions(+), 0 deletions(-)
diff --git a/libvirt/ansible/playbook.yml b/libvirt/ansible/playbook.yml
@@ -98,6 +98,16 @@
loop: '{{ additional_users }}'
when: item.authorized_key | default(false, true)
become: yes
+
+ - name: fix ssh user dir permissions
+ ansible.builtin.file:
+ path: '/home/{{ item.name }}/.ssh'
+ state: directory
+ recurse: yes
+ owner: '{{ item.name }}'
+ group: '{{ item.name }}'
+ loop: '{{ additional_users }}'
+ become: yes
when: additional_users | default(false, true)
# endblock add additional users