mirror of
https://github.com/kemko/nomad.git
synced 2026-01-06 18:35:44 +03:00
Merge pull request #4279 from hashicorp/f-short-init
Add job init '-short' command docs to website
This commit is contained in:
@@ -5,6 +5,8 @@ import (
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
"github.com/posener/complete"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -39,6 +41,13 @@ func (c *JobInitCommand) Synopsis() string {
|
||||
return "Create an example job file"
|
||||
}
|
||||
|
||||
func (c *JobInitCommand) AutocompleteFlags() complete.Flags {
|
||||
return mergeAutocompleteFlags(c.Meta.AutocompleteFlags(FlagSetClient),
|
||||
complete.Flags{
|
||||
"-short": complete.PredictNothing,
|
||||
})
|
||||
}
|
||||
|
||||
func (c *JobInitCommand) Name() string { return "job init" }
|
||||
|
||||
func (c *JobInitCommand) Run(args []string) int {
|
||||
@@ -95,10 +104,6 @@ job "example" {
|
||||
datacenters = ["dc1"]
|
||||
|
||||
group "cache" {
|
||||
ephemeral_disk {
|
||||
size = 300
|
||||
}
|
||||
|
||||
task "redis" {
|
||||
driver = "docker"
|
||||
|
||||
|
||||
@@ -16,6 +16,10 @@ groups, runtime constraints, and resource allocation.
|
||||
Please refer to the [jobspec][] and [drivers](/docs/drivers/index.html)
|
||||
pages to learn how to customize the template.
|
||||
|
||||
## Init Options
|
||||
|
||||
* `-short`: If set, a minimal jobspec without comments is emitted.
|
||||
|
||||
## Examples
|
||||
|
||||
Generate an example job file:
|
||||
|
||||
Reference in New Issue
Block a user