Fix HCL on interpreted.html
This commit is contained in:
parent
1d71ac1a9f
commit
a883bbfb42
|
@ -16,7 +16,7 @@ scheduler has placed them on a particular node.
|
|||
The syntax for interpreting variables is `${variable}`. An example and a
|
||||
comprehensive list of interpretable fields can be seen below:
|
||||
|
||||
```
|
||||
```hcl
|
||||
task "demo" {
|
||||
driver = "docker"
|
||||
|
||||
|
@ -27,7 +27,10 @@ task "demo" {
|
|||
|
||||
# Interpret runtime variables to inject the address to bind to and the
|
||||
# location to write logs to.
|
||||
args = ["--bind=${NOMAD_ADDR_RPC}", "--logs=${NOMAD_ALLOC_DIR}/logs"]
|
||||
args = [
|
||||
"--bind", "${NOMAD_ADDR_RPC}",
|
||||
"--logs", "${NOMAD_ALLOC_DIR}/logs",
|
||||
]
|
||||
|
||||
port_map {
|
||||
RPC = 6379
|
||||
|
@ -42,7 +45,7 @@ task "demo" {
|
|||
}
|
||||
|
||||
# Environment variables are interpreted and can contain both runtime and
|
||||
# node attributes.
|
||||
# node attributes. There environment variables are passed into the task.
|
||||
env {
|
||||
"DC" = "Running on datacenter ${node.datacenter}"
|
||||
"VERSION" = "Version ${NOMAD_META_VERSION}"
|
||||
|
@ -229,4 +232,3 @@ a particular node and as such can not be used in constraints.
|
|||
<td>Interpret an environment variable with key `env_key` set on the task.</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
|
Loading…
Reference in a new issue