Fix HCL on interpreted.html

This commit is contained in:
Seth Vargo 2016-10-03 15:50:35 -04:00
parent 1d71ac1a9f
commit a883bbfb42
No known key found for this signature in database
GPG key ID: 905A90C2949E8787

View file

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