feat: add tasks to ensure /mnt directory exists and set ownership for mount points
Some checks failed
Nix Format Check / check-format (push) Failing after 36s

This commit is contained in:
Menno van Leeuwen 2025-03-12 10:29:00 +01:00
parent 1b6bc8f781
commit 66537daed2
Signed by: vleeuwenmenno
SSH Key Fingerprint: SHA256:OJFmjANpakwD3F2Rsws4GLtbdz1TJ5tkQF0RZmF0TRE

View File

@ -9,19 +9,26 @@
ansible.builtin.command: modprobe zfs
become: true
- name: Ensure /mnt directory exists with proper permissions
ansible.builtin.file:
path: /mnt
state: directory
mode: "0755"
become: true
- name: Create mount points
ansible.builtin.file:
path: "{{ item }}"
state: directory
mode: "0755"
owner: menno
group: users
become: true
with_items:
- /mnt/isos
- /mnt/vms
- /mnt/ai
- /mnt/astrophotography
- /mnt/audiobooks
- /mnt/backups
- /mnt/backups/photos
- /mnt/backups/services
- /mnt/downloads
@ -56,3 +63,29 @@
- { path: /mnt/services, src: datapool/services }
- { path: /mnt/stash, src: datapool/stash }
- { path: /mnt/tvshows, src: datapool/tv_shows }
- name: Set ownership after mounting
ansible.builtin.file:
path: "{{ item }}"
state: directory
recurse: false
mode: "0755"
owner: menno
group: users
become: true
with_items:
- /mnt/isos
- /mnt/vms
- /mnt/ai
- /mnt/astrophotography
- /mnt/audiobooks
- /mnt/backups/photos
- /mnt/backups/services
- /mnt/downloads
- /mnt/movies
- /mnt/music
- /mnt/old_backups
- /mnt/photos
- /mnt/services
- /mnt/stash
- /mnt/tvshows