open-nomad/e2e/isolation/input/echo_pid.nomad
2021-01-28 12:03:19 +00:00

39 lines
590 B
HCL

job "echo_pid" {
datacenters = ["dc1"]
type = "batch"
constraint {
attribute = "${attr.kernel.name}"
value = "linux"
}
group "echo_pid" {
task "echo_pid" {
driver = "exec"
config {
command = "bash"
args = [
"-c", "local/pid.sh"
]
}
template {
data = <<EOF
#!/usr/bin/env bash
echo my pid is $BASHPID
EOF
destination = "local/pid.sh"
perms = "777"
change_mode = "noop"
}
resources {
cpu = 100
memory = 64
}
}
}
}