Update YAMLSyntax.rst

A brief explanation was added regarding multi-line values.
pull/14508/head
brianlycett 9 years ago
parent 665e158ec0
commit 4160a3f40b

@ -77,18 +77,21 @@ 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::
ignore_newlines: >
this is really a
single line of text
despite appearances
include_newlines: | include_newlines: |
exactly as you see exactly as you see
will appear these three will appear these three
lines of poetry lines of poetry
ignore_newlines: >
this is really a
single line of text
despite appearances
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…
Cancel
Save