variable "lego_version" { default = "4.14.2" type = string } variable "nomad_var_dirsync_version" { default = "0.0.2" type = string } job "lego" { type = "batch" periodic { cron = "@weekly" prohibit_overlap = true } group "main" { network { dns { servers = ["1.1.1.1", "1.0.0.1"] } } task "main" { driver = "exec" config { # image = "alpine:3" command = "/bin/bash" args = ["${NOMAD_TASK_DIR}/start.sh"] } artifact { source = "https://github.com/go-acme/lego/releases/download/v${var.lego_version}/lego_v${var.lego_version}_linux_${attr.cpu.arch}.tar.gz" } artifact { source = "https://git.iamthefij.com/iamthefij/nomad-var-dirsync/releases/download/v${var.nomad_var_dirsync_version}/nomad-var-dirsync-linux-${attr.cpu.arch}.tar.gz" } template { data = <