summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorMarko Stanković <sm4rk0@users.noreply.github.com>2017-03-03 21:49:03 +0100
committerscottb <dharmabumstead@users.noreply.github.com>2017-03-03 12:49:03 -0800
commit10125d520dfde00bafc10f123635de82158a1c5d (patch)
tree7483f4fbf97ee29c056bafd67d8d4b0bead8e55d /docs
parent7018aa33161b0aff620e068259e353fdc1e6c9d8 (diff)
downloadansible-10125d520dfde00bafc10f123635de82158a1c5d.tar.gz
Improve YAMLSyntax/Gotchas (#21575)
* Improve YAMLSyntax/Gotchas Colons don't need to be quoted unless when followed by a space or the end of the line * Update YAMLSyntax.rst Minor edit.
Diffstat (limited to 'docs')
-rw-r--r--docs/docsite/rst/YAMLSyntax.rst12
1 files changed, 10 insertions, 2 deletions
diff --git a/docs/docsite/rst/YAMLSyntax.rst b/docs/docsite/rst/YAMLSyntax.rst
index 6aada5bb73..894dd3838a 100644
--- a/docs/docsite/rst/YAMLSyntax.rst
+++ b/docs/docsite/rst/YAMLSyntax.rst
@@ -123,11 +123,19 @@ While YAML is generally friendly, the following is going to result in a YAML syn
foo: somebody said I should put a colon here: so I did
-You will want to quote any hash values using colons, like so::
+ windows_drive: c:
+
+...but this will work::
+
+ windows_path: c:\windows
+
+You will want to quote hash values using colons followed by a space or the end of the line::
foo: "somebody said I should put a colon here: so I did"
+
+ windows_drive: "c:"
-And then the colon will be preserved.
+...and then the colon will be preserved.
Further, Ansible uses "{{ var }}" for variables. If a value after a colon starts
with a "{", YAML will think it is a dictionary, so you must quote it, like so::