github.com/hernad/nomad@v1.6.112/e2e/taskevents/input/completed_leader.nomad (about)

     1  # Copyright (c) HashiCorp, Inc.
     2  # SPDX-License-Identifier: MPL-2.0
     3  
     4  job "completed_leader" {
     5    type        = "batch"
     6    datacenters = ["dc1"]
     7  
     8    constraint {
     9      attribute = "${attr.kernel.name}"
    10      value     = "linux"
    11    }
    12  
    13    group "completed_leader" {
    14      restart {
    15        attempts = 0
    16      }
    17  
    18      # Only the task named the same as the job has its events tested.
    19      task "completed_leader" {
    20        driver = "raw_exec"
    21  
    22        config {
    23          command = "sleep"
    24          args    = ["1000"]
    25        }
    26      }
    27  
    28      task "leader" {
    29        leader = true
    30        driver = "raw_exec"
    31  
    32        config {
    33          command = "sleep"
    34          args    = ["1"]
    35        }
    36      }
    37    }
    38  }