Add documentation on YAML floating-point values (#17182)

This commit is contained in:
Jeremy Swinarton 2016-11-28 04:58:43 -05:00 committed by scottb
parent ad7448d24c
commit 3e041a82c4
2 changed files with 9 additions and 1 deletions

View file

@ -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`

View file

@ -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
============