- name: Install ZFS ansible.builtin.package: name: - zfsutils-linux become: true - name: Ensure ZFS kernel module is loaded ansible.builtin.command: modprobe zfs become: true - name: Create mount points ansible.builtin.file: path: "{{ item }}" state: directory mode: "0755" owner: menno group: users 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 - name: Mount ZFS datasets mount: path: "{{ item.path }}" src: "{{ item.src }}" fstype: zfs state: mounted with_items: - { path: /mnt/isos, src: datapool/isos } - { path: /mnt/vms, src: datapool/vms } - { path: /mnt/ai, src: datapool/ai } - { path: /mnt/astrophotography, src: datapool/astro } - { path: /mnt/audiobooks, src: datapool/audiobooks } - { path: /mnt/backups/photos, src: backup/photos-duplicati } - { path: /mnt/backups/services, src: backup/services-duplicati } - { path: /mnt/downloads, src: datapool/downloads } - { path: /mnt/movies, src: datapool/movies } - { path: /mnt/music, src: datapool/music } - { path: /mnt/old_backups, src: datapool/old_backups } - { path: /mnt/photos, src: datapool/photos } - { path: /mnt/services, src: datapool/services } - { path: /mnt/stash, src: datapool/stash } - { path: /mnt/tvshows, src: datapool/tv_shows }