summaryrefslogtreecommitdiff
path: root/dan
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2020-06-01 23:38:01 +0200
committerChristian Pointner <equinox@spreadspace.org>2020-06-01 23:38:01 +0200
commit3ac1a667fa7f9017e97c2fa1c470d125c84c04b5 (patch)
tree23c41b6558c66e9100061d996eaae6dabdf03084 /dan
parentopenbsd installer: fix SMP install (diff)
upgrade sk-2019 to new zfs deployment
Diffstat (limited to 'dan')
-rw-r--r--dan/sk-2019.yml94
1 files changed, 68 insertions, 26 deletions
diff --git a/dan/sk-2019.yml b/dan/sk-2019.yml
index b5f048e5..ac362ebd 100644
--- a/dan/sk-2019.yml
+++ b/dan/sk-2019.yml
@@ -1,33 +1,63 @@
---
- name: Basic Setup
hosts: sk-2019
- tasks:
- - debug:
- msg: "please use the branch topic/skillz-legacy for this host"
- #roles:
- # - role: apt-repo/base
- # - role: core/base
+ roles:
+ - role: apt-repo/base
+ - role: core/base
# - role: core/sshd
- # - role: core/zsh
- # - role: core/cpu-microcode
- # - role: core/admin-users
- # - 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
+ - role: core/zsh
+ - role: core/cpu-microcode
+ - role: core/admin-users
+ - 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
+ systemctl restart mariadb.service
+ systemctl restart apache2.service
+
+ - name: install ispconfig fix systemd service unit
+ copy:
+ dest: /etc/systemd/system/fix-fstab.service
+ content: |
+ [Unit]
+ Description=fix fstab entries made by ispconfig
+
+ [Service]
+ Type=oneshot
+ ExecStart=/usr/bin/sed s/bind,nobootwait/bind,nofail/ -i /etc/fstab
+
+ - name: install ispconfig fix systemd service unit
+ copy:
+ dest: /etc/systemd/system/fix-fstab.timer
+ content: |
+ [Unit]
+ Description=fix fstab entries made by ispconfig
+
+ [Timer]
+ OnCalendar=*-*-* *:*:00
+
+ [Install]
+ WantedBy=timers.target
+
+ - name: enable and start fstab fix
+ systemd:
+ name: fix-fstab.timer
+ daemon_reload: yes
+ enabled: yes
+ state: started
### TODO:
#
@@ -52,3 +82,15 @@
#
# mount -a
#
+
+
+########### manual post-boot
+
+# cat /etc/fstab | grep "^/var/log" | awk '{ system("umount "$2) }'
+# umount /srv/storage/www/clients/client2/web2/web/shared/fileadmin/wolke
+# umount /srv/storage/www/clients/client2/web2/web/shared/fileadmin/wolke
+# umount /srv/storage/www/clients/client2/web2/web/shared/fileadmin/wolke
+# mount | grep systemd-1 | awk '{ print($3) }' | grep "^/var" | xargs umount
+# mount | grep systemd-1 | awk '{ print($3) }' | grep "^/var" | xargs umount
+# mount | grep systemd-1 | awk '{ print($3) }' | grep "^/var" | xargs umount
+# rm -rf /srv/storage/*