github.com/anth0d/nomad@v0.0.0-20221214183521-ae3a0a2cad06/e2e/isolation/input/exec_host.nomad (about) 1 job "exec" { 2 datacenters = ["dc1"] 3 type = "batch" 4 5 constraint { 6 attribute = "${attr.kernel.name}" 7 value = "linux" 8 } 9 10 group "exec" { 11 task "exec" { 12 driver = "exec" 13 14 config { 15 command = "bash" 16 args = [ 17 "-c", "local/pid.sh" 18 ] 19 pid_mode = "host" 20 ipc_mode = "host" 21 } 22 23 template { 24 data = <<EOF 25 #!/usr/bin/env bash 26 echo my pid is $BASHPID 27 EOF 28 29 destination = "local/pid.sh" 30 perms = "777" 31 change_mode = "noop" 32 } 33 34 resources { 35 cpu = 100 36 memory = 64 37 } 38 } 39 } 40 }