ansible-hashistack/roles/nomad/tasks/testjob-with-volumes.nomad.hcl
2023-09-25 13:55:32 +02:00

25 lines
465 B
HCL

job "test" {
datacenters = ["dc1"]
type = "service"
group "server" {
count = 2
volume "test" {
type = "csi"
source = "test"
access_mode = "multi-node-multi-writer"
attachment_mode = "file-system"
}
task "server" {
driver = "docker"
config {
image = "alpine"
args = ["sleep", "3600"]
}
volume_mount {
volume = "test"
destination = "/mnt/test"
}
}
}
}