From c5d5ab42b85453c533a53bbb05de70368771c1ba Mon Sep 17 00:00:00 2001 From: Ian Fijolek Date: Tue, 23 Jan 2024 12:05:56 -0800 Subject: [PATCH] Add some nomad actions for backups to test different formatting --- backups/backup.nomad | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/backups/backup.nomad b/backups/backup.nomad index 8e44c58..7d66040 100644 --- a/backups/backup.nomad +++ b/backups/backup.nomad @@ -87,9 +87,19 @@ job "backup%{ if batch_node != null }-oneoff-${batch_node}%{ endif }" { ] } - action "unlock" { + action "unlockenv" { + command = "sh" + args = ["-c", "/bin/resticscheduler -once -unlock all $${NOMAD_TASK_DIR}/node-jobs.hcl"] + } + + action "unlocktmpl" { command = "/bin/resticscheduler" - args = ["-once", "-unlock", "all", "$${NOMAD_TASK_DIR}/node-jobs.hcl"] + args = ["-once", "-unlock", "all", "{{ env 'NOMAD_TASK_DIR' }}/node-jobs.hcl"] + } + + action "unlockhc" { + command = "/bin/resticscheduler" + args = ["-once", "-unlock", "all", "/local/node-jobs.hcl"] } env = {