summaryrefslogtreecommitdiff
path: root/dan/sk-2019vm.yml
blob: 42354bc65faf883af09a3d6d8a67430336aac565 (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
---
- name: Basic Setup
  hosts: sk-2019vm
  roles:
  - role: base
  - role: sshd
  - role: zsh
  - role: admin-user
  - 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