diff options
author | brianlycett <brian.lycett@ontrackretail.co.uk> | 2016-02-24 15:06:21 +0000 |
---|---|---|
committer | brianlycett <brian.lycett@ontrackretail.co.uk> | 2016-02-24 15:06:21 +0000 |
commit | 4160a3f40b8b4b45547b188473c93aaaa45eff51 (patch) | |
tree | 852eee5a67b5c83743d0aa53b032b2a1e87dc94f | |
parent | 665e158ec05d49b53e0d057ce5debaf5b500e981 (diff) | |
download | ansible-4160a3f40b8b4b45547b188473c93aaaa45eff51.tar.gz |
Update YAMLSyntax.rst
A brief explanation was added regarding multi-line values.
-rw-r--r-- | docsite/rst/YAMLSyntax.rst | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/docsite/rst/YAMLSyntax.rst b/docsite/rst/YAMLSyntax.rst index 4b2ec0535d..b8d19099eb 100644 --- a/docsite/rst/YAMLSyntax.rst +++ b/docsite/rst/YAMLSyntax.rst @@ -77,18 +77,21 @@ Ansible doesn't really use these too much, but you can also specify a boolean va likes_emacs: TRUE 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: | exactly as you see will appear these three 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. This really has nothing to do with Ansible, but will give you a feel for the format:: |