fix: add task to set persistent ZFS mountpoints in Ansible playbook

This commit is contained in:
Menno van Leeuwen 2025-03-12 21:19:17 +01:00
parent 0fc1146b91
commit 0ef4c4a779
Signed by: vleeuwenmenno
SSH Key Fingerprint: SHA256:OJFmjANpakwD3F2Rsws4GLtbdz1TJ5tkQF0RZmF0TRE

View File

@ -115,3 +115,24 @@
- /mnt/tvshows
# - /mnt/old_backups
when: datapool_check.rc == 0
# This is needed to actually set the mountpoints in ZFS so they are persistent after reboots!
- name: Set ZFS mountpoints
community.general.zfs:
name: "{{ item.src }}"
state: present
extra_zfs_properties:
mountpoint: "{{ item.path }}"
become: true
with_items:
- { path: /mnt/isos, src: datapool/isos }
- { path: /mnt/vms, src: datapool/vms }
- { path: /mnt/ai, src: datapool/ai }
- { path: /mnt/downloads, src: datapool/downloads }
- { path: /mnt/services, src: datapool/services }
- { path: /mnt/audiobooks, src: datapool/audiobooks }
- { path: /mnt/music, src: datapool/music }
- { path: /mnt/photos, src: datapool/photos }
- { path: /mnt/movies, src: datapool/movies }
- { path: /mnt/tvshows, src: datapool/tv_shows }
when: datapool_check.rc == 0