github.com/hernad/nomad@v1.6.112/e2e/scheduler_system/input/system_job0.nomad (about)

     1  # Copyright (c) HashiCorp, Inc.
     2  # SPDX-License-Identifier: MPL-2.0
     3  
     4  job "system_job" {
     5    datacenters = ["dc1", "dc2"]
     6  
     7    type = "system"
     8  
     9    constraint {
    10      attribute = "${attr.kernel.name}"
    11      value     = "linux"
    12    }
    13  
    14    group "system_job_group" {
    15      count = 1
    16  
    17      restart {
    18        attempts = 10
    19        interval = "1m"
    20  
    21        delay = "2s"
    22        mode  = "delay"
    23      }
    24  
    25      task "system_task" {
    26        driver = "docker"
    27  
    28        config {
    29          image = "busybox:1"
    30  
    31          command = "/bin/sh"
    32          args    = ["-c", "sleep 15000"]
    33        }
    34  
    35        env {
    36          version = "1"
    37        }
    38      }
    39    }
    40  }