github.com/hernad/nomad@v1.6.112/e2e/isolation/input/exec_host.hcl (about) 1 # Copyright (c) HashiCorp, Inc. 2 # SPDX-License-Identifier: MPL-2.0 3 4 job "exec_host" { 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 pid_mode = "host" 32 ipc_mode = "host" 33 } 34 35 template { 36 data = <<EOF 37 #!/usr/bin/env bash 38 echo my pid is $BASHPID 39 EOF 40 41 destination = "local/pid.sh" 42 perms = "777" 43 change_mode = "noop" 44 } 45 46 resources { 47 cpu = 10 48 memory = 16 49 } 50 } 51 } 52 }