job "diagnostics" { region = "global" datacenters = ["{{ datacenter_name }}"] type = "service" // constraint { // attribute = "${node.unique.name}" // operator = "regexp" // value = "rpi(1|2|3)" // } group "diagnostics" { count = 1 restart { attempts = 0 delay = "30s" } task "diagnostics" { // env { // KEY = "VALUE" // } driver = "docker" config { image = "alpine:latest" hostname = "${NOMAD_JOB_NAME}" args = [ "/bin/sh", "-c", "chmod 755 /local/bootstrap.sh && /local/bootstrap.sh" ] volumes = [ "${meta.nfsStorageRoot}/pi-cluster/backups/config_backups:/backups", "${meta.localStorageRoot}:/docker" ] } // docker config template { destination = "local/bootstrap.sh" data = <