summaryrefslogtreecommitdiff
path: root/dan
diff options
context:
space:
mode:
Diffstat (limited to 'dan')
-rw-r--r--dan/sk-2019.yml28
1 files changed, 15 insertions, 13 deletions
diff --git a/dan/sk-2019.yml b/dan/sk-2019.yml
index 16045795..058f2732 100644
--- a/dan/sk-2019.yml
+++ b/dan/sk-2019.yml
@@ -8,6 +8,21 @@
- role: admin-user
- role: cryptdisk
- role: zfs/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
+ mount -a
### TODO:
#
@@ -32,16 +47,3 @@
#
# mount -a
#
-#
-### write script to /usr/local/bin/post-boot
-##
-## #!/bin/bash
-## set -e
-## cryptsetup luksOpen /dev/disk/by-id/nvme-eui.0025388791050fef-part3 crypto-nvme0
-## cryptsetup luksOpen /dev/disk/by-id/nvme-eui.0025388791050fdc-part3 crypto-nvme1
-## systemctl restart zfs-import-cache.service
-## systemctl restart zfs-mount.service
-## mount -a
-#
-# chmod +x /usr/local/bin/post-boot
-#