fix: add task to set persistent ZFS mountpoints in Ansible playbook
This commit is contained in:
@ -115,3 +115,24 @@
|
|||||||
- /mnt/tvshows
|
- /mnt/tvshows
|
||||||
# - /mnt/old_backups
|
# - /mnt/old_backups
|
||||||
when: datapool_check.rc == 0
|
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
|
||||||
|
Reference in New Issue
Block a user