website: use a helper for general options

This commit is contained in:
Ryan Uber 2015-09-15 13:39:57 -07:00
parent a91b883f0b
commit d1e16bbee6
11 changed files with 22 additions and 15 deletions

View file

@ -0,0 +1,9 @@
module CommandHelpers
# Returns the markdown text for the general options usage.
def general_options_usage()
<<EOF
* `-address=<addr>`: The address of the Nomad server. Overrides the "NOMAD_ADDR"
environment variable if set. Defaults to "http://127.0.0.1:4646".
EOF
end
end

View file

@ -24,8 +24,7 @@ to enter the "left" state.
## General Options
* `-address`: The address of the Nomad server. Overrides the `NOMAD_ADDR`
environment variable if set. Defaults to `http://127.0.0.1:4646`.
<%= general_options_usage %>
## Examples

View file

@ -20,8 +20,7 @@ nomad agent-info [options]
## General Options
* `-address`: The address of the Nomad server. Overrides the `NOMAD_ADDR`
environment variable if set. Defaults to `http://127.0.0.1:4646`.
<%= general_options_usage %>
## Output

View file

@ -26,8 +26,7 @@ be 1.
## General Options
* `-address`: The address of the Nomad server. Overrides the `NOMAD_ADDR`
environment variable if set. Defaults to `http://127.0.0.1:4646`.
<%= general_options_usage %>
## Examples

View file

@ -20,8 +20,7 @@ nomad agent-members [options]
## General Options
* `-address`: The address of the Nomad server. Overrides the `NOMAD_ADDR`
environment variable if set. Defaults to `http://127.0.0.1:4646`.
<%= general_options_usage %>
## Members Options

View file

@ -26,13 +26,17 @@ disable drain mode for. It is also required to pass one of `-enable` or
## General Options
* `-address`: The address of the Nomad server. Overrides the `NOMAD_ADDR`
environment variable if set. Defaults to `http://127.0.0.1:4646`.
<%= general_options_usage %>
## Node Drain Options
* `-enable`: Enable node drain mode.
* `-disable`: Disable node drain mode.
## Examples
Enable drain mode on node1:
```
$ nomad node-drain node1
$ nomad node-drain -enable node1
```

View file

@ -26,8 +26,7 @@ displayed.
## General Options
* `-address`: The address of the Nomad server. Overrides the `NOMAD_ADDR`
environment variable if set. Defaults to `http://127.0.0.1:4646`.
<%= general_options_usage %>
## Node Status Options

View file

@ -23,8 +23,7 @@ useful status fields for each.
## General Options
* `-address`: The address of the Nomad server. Overrides the `NOMAD_ADDR`
environment variable if set. Defaults to `http://127.0.0.1:4646`.
<%= general_options_usage %>
## Status Options