github.com/hernad/nomad@v1.6.112/e2e/isolation/input/exec.hcl (about) 1 # Copyright (c) HashiCorp, Inc. 2 # SPDX-License-Identifier: MPL-2.0 3 4 job "exec" { 5 type = "batch" 6 7 constraint { 8 attribute = "${attr.kernel.name}" 9 value = "linux" 10 } 11 12 group "group" { 13 reschedule { 14 attempts = 0 15 unlimited = false 16 } 17 18 restart { 19 attempts = 0 20 mode = "fail" 21 } 22 23 task "bash" { 24 driver = "exec" 25 26 config { 27 command = "bash" 28 args = [ 29 "-c", "local/pid.sh" 30 ] 31 } 32 33 template { 34 data = <<EOF 35 #!/usr/bin/env bash 36 echo my pid is $BASHPID 37 EOF 38 39 destination = "local/pid.sh" 40 perms = "755" 41 change_mode = "noop" 42 } 43 44 resources { 45 cpu = 10 46 memory = 16 47 } 48 } 49 } 50 }