summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--hiera/data/node/mail.yaml3
-rw-r--r--hiera/data/node/partofme.yaml4
-rw-r--r--hiera/data/node/tozt.yaml1
-rw-r--r--modules/godwrap/manifests/init.pp4
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;
}
}