// Copyright (c) HashiCorp, Inc. // SPDX-License-Identifier: MPL-2.0 package command import ( "fmt" "os" "strings" "github.com/hashicorp/nomad/api" "github.com/hashicorp/nomad/command/asset" "github.com/posener/complete" ) const ( // DefaultInitName is the default name we use when // initializing the example file DefaultInitName = "example.nomad.hcl" ) // JobInitCommand generates a new job template that you can customize to your // liking, like vagrant init type JobInitCommand struct { Meta } func (c *JobInitCommand) Help() string { helpText := ` Usage: nomad job init Alias: nomad init Creates an example job file that can be used as a starting point to customize further. If no filename is given, the default of "example.nomad.hcl" will be used. Init Options: -short If the short flag is set, a minimal jobspec without comments is emitted. -connect If the connect flag is set, the jobspec includes Consul Connect integration. -template Specifies a predefined template to initialize. Must be a Nomad Variable that lives at nomad/job-templates/