--- - name: Basic Setup hosts: sk-tomnext roles: - role: core/base - role: core/sshd - role: core/zsh - role: apt-repo/base - role: admin-user - role: cryptdisk - role: zfs/base - role: apt-repo/spreadspace - role: zfs/sanoid - role: vm/host - role: installer/debian/base tasks: - name: install post-boot script copy: dest: /usr/local/bin/post-boot mode: 0755 content: | #!/bin/bash set -e {% for name, volume in cryptdisk_volumes.items() %} cryptsetup luksOpen '{{ volume.device }}' '{{ name }}' {% endfor %} systemctl restart zfs-import-cache.service systemctl restart zfs-mount.service systemctl restart zfs-share.service systemctl restart zfs-zed.service mount -a sleep 2 systemctl restart libvirtd.service