Skip to content

Commit

Permalink
Added small clarifications about ordering of vars promises
Browse files Browse the repository at this point in the history
Signed-off-by: Ole Herman Schumacher Elgesem <ole.elgesem@northern.tech>
(cherry picked from commit 62dec80)
  • Loading branch information
olehermanse authored and nickanderson committed Jan 11, 2019
1 parent 45d19c8 commit b10fc19
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion reference/language-concepts/normal-ordering.markdown
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -139,7 +139,9 @@ the normal ordering is:
reports reports


The order of promises within one of the above types follows their top-down The order of promises within one of the above types follows their top-down
ordering within the bundle itself. The order may be overridden by making a ordering within the bundle itself. In vars this can be used to override the
value of a variable, if you have two vars promises with the same name, the
last one will override the first one. The order may be overridden by making a
promise depend on a class that is set by another promise, or by using the promise depend on a class that is set by another promise, or by using the
`depends_on` attribute in the promise. `depends_on` attribute in the promise.


Expand Down
2 changes: 2 additions & 0 deletions reference/promise-types/vars.markdown
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -376,3 +376,5 @@ two_example_com::
string => "two.example.com", string => "two.example.com",
comment => "Define a global domain for hosts in the two.example.com domain"; comment => "Define a global domain for hosts in the two.example.com domain";
``` ```

(Promises within the same bundle are evaluated top to bottom, so vars promises further down in a bundle can overwrite previous values of a variable. See [**normal ordering**][Normal Ordering] for more information).

0 comments on commit b10fc19

Please sign in to comment.