diff options
Diffstat (limited to 'dan')
-rw-r--r-- | dan/sk-2019vm.yml | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/dan/sk-2019vm.yml b/dan/sk-2019vm.yml index 00c6a067..42354bc6 100644 --- a/dan/sk-2019vm.yml +++ b/dan/sk-2019vm.yml @@ -9,3 +9,21 @@ - role: cryptdisk - role: zfs/base - role: vm/host + 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 + mount -a + + sleep 2 + systemctl restart libvirtd.service |