summaryrefslogtreecommitdiff
path: root/chaos-at-home
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2021-01-24 00:13:22 +0100
committerChristian Pointner <equinox@spreadspace.org>2021-01-24 00:13:22 +0100
commit3ef2e1af263fbabfffb08090c0808672f694a5a7 (patch)
tree7160ac04e18b02ce6ea90443bce15449fffc8734 /chaos-at-home
parentadd basic playbook for epimetheus (diff)
cryptdisk and basic zfs setup for epimetheus
Diffstat (limited to 'chaos-at-home')
-rw-r--r--chaos-at-home/ch-epimetheus.yml31
-rw-r--r--chaos-at-home/host_vars/ch-epimetheus.yml26
2 files changed, 57 insertions, 0 deletions
diff --git a/chaos-at-home/ch-epimetheus.yml b/chaos-at-home/ch-epimetheus.yml
index 1479abd2..f1c567dd 100644
--- a/chaos-at-home/ch-epimetheus.yml
+++ b/chaos-at-home/ch-epimetheus.yml
@@ -8,6 +8,10 @@
- role: core/zsh
- role: core/ntp
- role: network/wakeonlan
+ - role: cryptdisk
+ - role: zfs/base
+ - role: apt-repo/spreadspace
+ - role: zfs/sanoid
post_tasks:
- name: install simple suspend script
copy:
@@ -24,3 +28,30 @@
fi
dest: /root/suspend.sh
mode: 0755
+
+ - 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() %}
+ echo -e "opening crypto volume: \033[1;37m{{ name }}\033[0m"
+ cryptsetup luksOpen '{{ volume.device }}' '{{ name }}'
+ {% endfor %}
+
+ systemctl restart zfs-import-cache.service
+ systemctl restart zfs-mount.service
+ systemctl restart zfs-share.service
+ systemctl restart zfs-zed.service
+ mount -a
+
+ - name: install dstat script
+ copy:
+ dest: /usr/local/bin/dstat.sh
+ mode: 0755
+ content: |
+ #!/bin/bash
+ exec dstat -cnd -N enp5s0 -D sdc,sda,sdb,sdd,sde --disk-util --top-io --top-bio
diff --git a/chaos-at-home/host_vars/ch-epimetheus.yml b/chaos-at-home/host_vars/ch-epimetheus.yml
new file mode 100644
index 00000000..d1059a8f
--- /dev/null
+++ b/chaos-at-home/host_vars/ch-epimetheus.yml
@@ -0,0 +1,26 @@
+$ANSIBLE_VAULT;1.2;AES256;chaos-at-home
+61666465336530396664363230656666656539666232626134383134336666623431623138626531
+3936333933393634396361326632626639383266643063610a643838303433373433646166323766
+34656362633630333663613563633066643531663339373534346238383863323339336365343932
+3435613663303062620a386338363932653238386534336161396535323533666638613466326134
+32646161663366363731366464386130306131383837363032386564316531323231386264323531
+33363831313662633830313638356565383638616530666161303433373831656130316261326265
+39316131643264303336393931346430613839323435653333396137666636333237616332336362
+64393762613063623935353431323732316131306364343338643436356632633033386530383330
+36326331323163323138393038633065633636396230386564336533656266633462633162363637
+38646638663863373437656138383862626163313139333961303266633330313738633461633636
+30653538383131616265623966626633313763663434343061386331653530343235346230623231
+33656435663536663965393063383666343735383762633961346437383066393739623437303365
+32643333383733323162613538396235373630313339653137613831326135626463373362346232
+35613863386639353330306338363264613961623863303061393766373730626535356666383236
+66366361616533613532323933323361633133336538363337633862643230336364336333656433
+64353563383630336364366135613463376435393262633934613539386633376663643463353561
+32626634623838313231623766373734383761663239356334343538666363373766646536313266
+34333130613435363065346265346565383062383962316366363436613538326632653861393764
+61336235336435313662336637633931636135383663393963396564303739333265313933326232
+39393934333330666433616237633865653637616439326333366534343532656333366436306532
+35353237373830373538346161333530393637326430333466303539633439356233333065623434
+61323364313734623930333233663431616463613635616261343230633362323436313663613431
+32616462316630633639613561313737346162633432343966383864323661666266626433356534
+66306566383961653031646563363935376464646339316665343538323431353631303930643863
+30363535346463333834303935653332366137633264616364356365343531623038