Skip to content

Instantly share code, notes, and snippets.

@carobme
Created February 28, 2023 10:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save carobme/d55fd1f5e71d288b16e4af1490987074 to your computer and use it in GitHub Desktop.
Save carobme/d55fd1f5e71d288b16e4af1490987074 to your computer and use it in GitHub Desktop.
job "test" {
namespace = "test"
datacenters = ["dc1"]
type = "service"
group "test" {
task "test" {
driver = "exec"
config {
command = "/bin/sleep"
args = [900]
}
env {
FOO = "bar"
}
template {
destination = "${NOMAD_SECRETS_DIR}/test"
change_mode = "noop"
data = <<EOF
pwd={{ with nomadVar "nomad/jobs/test" }}{{ .foo }}{{ end }}
EOF
}
resources {
cpu = 50
memory = 128
memory_max = 2048
}
restart {
attempts = -1
delay = "15s"
}
kill_timeout = "10s"
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment