mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Add some clarity to "multiple quotes" section of yaml docs
Fixes #41721
This commit is contained in:
parent
e2aa5114e4
commit
38d9b3d553
1 changed files with 14 additions and 2 deletions
|
@ -28,6 +28,7 @@ hit `Enter`. Also, you can convert tabs to 2 spaces by these commands in Vim:
|
|||
|
||||
Indentation
|
||||
===========
|
||||
|
||||
The suggested syntax for YAML files is to use 2 spaces for indentation,
|
||||
but YAML will follow whatever indentation system that the individual file
|
||||
uses. Indentation of two spaces works very well for SLS files given the
|
||||
|
@ -112,8 +113,19 @@ PyYAML will load these values as boolean ``True`` or ``False``. Un-capitalized
|
|||
versions will also be loaded as booleans (``true``, ``false``, ``yes``, ``no``,
|
||||
``on``, and ``off``). This can be especially problematic when constructing
|
||||
Pillar data. Make sure that your Pillars which need to use the string versions
|
||||
of these values are enclosed in quotes. Pillars will be parsed twice by salt,
|
||||
so you'll need to wrap your values in multiple quotes, for example '"false"'.
|
||||
of these values are enclosed in quotes. Pillars will be parsed twice by salt,
|
||||
so you'll need to wrap your values in multiple quotes, including double quotation
|
||||
marks (``" "``) and single quotation marks (``' '``). note that spaces are included
|
||||
in the quotation type examples for clarity.
|
||||
|
||||
Multiple quoting examples looks like this:
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
- '"false"'
|
||||
- "'True'"
|
||||
- "'YES'"
|
||||
- '"No"'
|
||||
|
||||
The '%' Sign
|
||||
============
|
||||
|
|
Loading…
Add table
Reference in a new issue