Skip to content

Commit

Permalink
Merge pull request #2400 from tzz/patch-2
Browse files Browse the repository at this point in the history
Fix inline YAML example
  • Loading branch information
nickanderson committed Jan 21, 2021
2 parents 9ea88d3 + bce7cdb commit 185656c
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions reference/promise-types/vars.markdown
Expand Up @@ -215,12 +215,14 @@ For example:
vars:
# JSON or YAML can be inlined since CFEngine 3.7
"inline1" data => '{"key":"value"}'; # JSON
"inline2" data => '---\n- key2: value2'; # YAML requires "---\n" header
"inline2" data => '---
- key2: value2'; # YAML requires "---" header followed by a newline
```

Inline YAML data has to begin with the `---\n` preamble. This preamble
Inline YAML data has to begin with the `---` preamble followed by a newline. This preamble
is normally optional but here (for inline YAML) it's required by
CFEngine.
CFEngine. To generate that in CFEngine, use `$(const.n)` or a literal
newline as shown in the example.

Inline JSON or YAML data may contain CFEngine variable references.
They will be expanded at runtime as if they were simply calls to
Expand Down

0 comments on commit 185656c

Please sign in to comment.