39 lines
554 B
HCL
39 lines
554 B
HCL
# Copyright (c) HashiCorp, Inc.
|
|
# SPDX-License-Identifier: MPL-2.0
|
|
|
|
job "alloc-logs" {
|
|
datacenters = ["dc1"]
|
|
type = "service"
|
|
|
|
#constraint {
|
|
# attribute = "${attr.kernel.name}"
|
|
# value = "linux"
|
|
#}
|
|
|
|
group "alloc-logs" {
|
|
|
|
task "test" {
|
|
driver = "raw_exec"
|
|
|
|
template {
|
|
data = <<EOH
|
|
while true
|
|
do
|
|
echo stdout >&1
|
|
sleep 1
|
|
echo stderr >&2
|
|
sleep 1
|
|
done
|
|
EOH
|
|
|
|
destination = "local/echo.sh"
|
|
}
|
|
|
|
config {
|
|
command = "bash"
|
|
args = ["local/echo.sh"]
|
|
}
|
|
}
|
|
}
|
|
}
|