From 3e041a82c45910fd10791f9ff9800334aca0bc39 Mon Sep 17 00:00:00 2001 From: Jeremy Swinarton Date: Mon, 28 Nov 2016 04:58:43 -0500 Subject: [PATCH] Add documentation on YAML floating-point values (#17182) --- docsite/rst/YAMLSyntax.rst | 8 ++++++++ docsite/rst/galaxy.rst | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/docsite/rst/YAMLSyntax.rst b/docsite/rst/YAMLSyntax.rst index 485e7765726..a29826cbaae 100644 --- a/docsite/rst/YAMLSyntax.rst +++ b/docsite/rst/YAMLSyntax.rst @@ -143,6 +143,14 @@ In these cases just use quotes:: other_string: "False" +YAML converts certain strings into floating-point values, such as the string +`1.0`. If you need to specify a version number (in a requirements.yml file, for +example), you will need to quote the value if it looks like a floating-point +value:: + + version: "1.0" + + .. seealso:: :doc:`playbooks` diff --git a/docsite/rst/galaxy.rst b/docsite/rst/galaxy.rst index 4536dfc561c..1f8f171ef4a 100644 --- a/docsite/rst/galaxy.rst +++ b/docsite/rst/galaxy.rst @@ -132,7 +132,7 @@ Use the following example as a guide for specifying roles in *requirements.yml*: # from GitLab or other git-based scm - src: git@gitlab.company.com:mygroup/ansible-base.git scm: git - version: 0.1.0 + version: "0.1" # quoted, so YAML doesn't parse this as a floating-point value Dependencies ============