summaryrefslogtreecommitdiff
path: root/dan/sk-2019vm.yml
blob: 6479636d08d491a961bc66c10736dd0d79fda9b5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
---
- name: Basic Setup
  hosts: sk-2019vm
  roles:
  - role: base
  - role: sshd
  - role: zsh
  - role: apt-repo/base
  - role: admin-user
  - role: cryptdisk
  - role: zfs/base
  - 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
        mount -a

        sleep 2
        systemctl restart libvirtd.service