Merge pull request #4279 from hashicorp/f-short-init

Add job init '-short' command docs to website
This commit is contained in:
Nick Ethier
2018-05-10 23:20:59 -04:00
committed by GitHub
2 changed files with 13 additions and 4 deletions

View File

@@ -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"

View File

@@ -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: