Fix documentation for interpolating attrs/meta

This PR fixes the website documentation to correctly present the way of
specifying constraints on node meta and attributes.
This commit is contained in:
Alex Dadgar
2017-01-03 13:25:56 -08:00
parent 500960ea4f
commit 55eaf2d24e
2 changed files with 4 additions and 4 deletions

View File

@@ -46,7 +46,7 @@ job "docs" {
task "server" {
# All tasks must run where "my_custom_value" is greater than 3.
constraint {
attribute = "${node.meta.my_custom_value}"
attribute = "${meta.my_custom_value}"
operator = ">"
value = "3"
}
@@ -210,7 +210,7 @@ utilizing node [metadata][meta].
```hcl
constraint {
attribute = "${node.meta.cached_binaries}"
attribute = "${meta.cached_binaries}"
set_contains = "redis,cypress,nginx"
}
```

View File

@@ -92,12 +92,12 @@ driver.
<td><tt>linux-64bit</tt></td>
</tr>
<tr>
<td><tt>${node.attr.&lt;property&gt;}</tt></td>
<td><tt>${attr.&lt;property&gt;}</tt></td>
<td>Property given by <tt>property</tt> on the client</td>
<td><tt>${attr.arch} => amd64</tt></td>
</tr>
<tr>
<td><tt>${node.meta.&lt;key&gt;}</tt></td>
<td><tt>${meta.&lt;key&gt;}</tt></td>
<td>Metadata value given by <tt>key</tt> on the client</td>
<td><tt>${meta.foo} => bar</tt></td>
</tr>