]> xn--ix-yja.es Git - infrastructure.git/commitdiff
Add userdirs
authoralex <alex@pdp7.net>
Sat, 11 Oct 2025 15:55:49 +0000 (17:55 +0200)
committeralex <alex@pdp7.net>
Sat, 11 Oct 2025 15:56:46 +0000 (17:56 +0200)
infrastructure/roles/users/tasks/main.yaml
infrastructure/roles/web/tasks/main.yaml

index 37d616c36374de7d9b4bdab7227cd7c5b31f44e2..43ecc2516755b44827b76f26f6ac9c3134b88633 100644 (file)
@@ -5,6 +5,12 @@
     groups:
       - sudo
   loop: "{{ users }}"
+- name: accesible home directory (for web serving, for example)
+  ansible.builtin.file:
+    path: "/home/{{ item.name }}"
+    state: directory
+    mode: '0701'
+  loop: "{{ users }}"
 - name: create .ssh directory
   ansible.builtin.file:
     path: "/home/{{ item.name }}/.ssh"
index 2bf04e2638de3aa667fc39d6fdb8a4c01352be06..9ef0a151da1e577f40bbab40f7db7b950ec4fb94 100644 (file)
     cmd: a2enmod ssl
     creates: /etc/apache2/mods-enabled/ssl.load
   notify: restart web
+- name: enable mod_userdir
+  ansible.builtin.command:
+    cmd: a2enmod userdir
+    creates: /etc/apache2/mods-enabled/userdir.load
+  notify: restart web
 - name: ssl site
   ansible.builtin.copy:
     dest: /etc/apache2/sites-enabled/ssl.conf