From 953b030829e931fec7129a2cc1cfac534980eb98 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Mon, 27 Mar 2023 06:24:05 -0400 Subject: don't make godwrap require /media/persistent to exist --- hiera/data/node/mail.yaml | 3 ++- hiera/data/node/partofme.yaml | 4 ++++ hiera/data/node/tozt.yaml | 1 + modules/godwrap/manifests/init.pp | 4 ++-- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/hiera/data/node/mail.yaml b/hiera/data/node/mail.yaml index 9267209..f12adc8 100644 --- a/hiera/data/node/mail.yaml +++ b/hiera/data/node/mail.yaml @@ -1,4 +1,5 @@ --- persistent_data: '/media/persistent' base::extra_script: | - (cd /media/persistent && sudo docker-compose pull -q) \ No newline at end of file + (cd /media/persistent && sudo docker-compose pull -q) +godwrap::directory: /media/persistent/godwrap diff --git a/hiera/data/node/partofme.yaml b/hiera/data/node/partofme.yaml index fed4580..6203875 100644 --- a/hiera/data/node/partofme.yaml +++ b/hiera/data/node/partofme.yaml @@ -5,3 +5,7 @@ # persistent_data: base::extra_script: | (sudo podman pull docker.io/pihole/pihole) +# still configure godwrap to write to /media/persistent since it will exist +# most of the time, and if a few cron runs end up on the root filesystem +# instead of the mounted disk, that's not the end of the world +godwrap::directory: /media/persistent/godwrap diff --git a/hiera/data/node/tozt.yaml b/hiera/data/node/tozt.yaml index c03fa5b..c595c50 100644 --- a/hiera/data/node/tozt.yaml +++ b/hiera/data/node/tozt.yaml @@ -3,3 +3,4 @@ persistent_data: '/media/persistent' base::extra_script: | (cd /home/doy/coding/metabase-utils && git pull) (sudo podman pull docker.io/vaultwarden/server) +godwrap::directory: /media/persistent/godwrap diff --git a/modules/godwrap/manifests/init.pp b/modules/godwrap/manifests/init.pp index 5e7f493..1d3579d 100644 --- a/modules/godwrap/manifests/init.pp +++ b/modules/godwrap/manifests/init.pp @@ -1,4 +1,4 @@ -class godwrap { +class godwrap($directory = "/var/lib/godwrap") { include go package::makepkg { 'godwrap': @@ -7,7 +7,7 @@ class godwrap { } file { - "/media/persistent/godwrap": + $directory: ensure => directory; } } -- cgit v1.2.3-54-g00ecf