mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Update YAMLSyntax.rst
A brief explanation was added regarding multi-line values.
This commit is contained in:
parent
665e158ec0
commit
4160a3f40b
1 changed files with 9 additions and 6 deletions
|
@ -77,17 +77,20 @@ Ansible doesn't really use these too much, but you can also specify a boolean va
|
||||||
likes_emacs: TRUE
|
likes_emacs: TRUE
|
||||||
uses_cvs: false
|
uses_cvs: false
|
||||||
|
|
||||||
Values can span multiple lines using *|* or *>* to include newlines or ignore them::
|
Values can span multiple lines using *|* or *>*. Spanning multiple lines using a *|* will include the newlines. Using a *>* will ignore newlines; it's used to make what would otherwise be a very long line easier to read and edit.
|
||||||
|
In either case the indentation will be ignored.
|
||||||
|
Examples are::
|
||||||
|
|
||||||
|
include_newlines: |
|
||||||
|
exactly as you see
|
||||||
|
will appear these three
|
||||||
|
lines of poetry
|
||||||
|
|
||||||
ignore_newlines: >
|
ignore_newlines: >
|
||||||
this is really a
|
this is really a
|
||||||
single line of text
|
single line of text
|
||||||
despite appearances
|
despite appearances
|
||||||
|
|
||||||
include_newlines: |
|
|
||||||
exactly as you see
|
|
||||||
will appear these three
|
|
||||||
lines of poetry
|
|
||||||
|
|
||||||
Let's combine what we learned so far in an arbitrary YAML example.
|
Let's combine what we learned so far in an arbitrary YAML example.
|
||||||
This really has nothing to do with Ansible, but will give you a feel for the format::
|
This really has nothing to do with Ansible, but will give you a feel for the format::
|
||||||
|
|
Loading…
Reference in a new issue