Add warning to get_or_set_hash about reserved chars

Refs #22141
This commit is contained in:
Mike Place 2015-05-13 02:17:54 -06:00
parent f20c0e42ce
commit dd9115466e

View file

@ -495,6 +495,13 @@ def get_or_set_hash(name,
.. code-block:: bash
salt '*' grains.get_or_set_hash 'django:SECRET_KEY' 50
.. warning::
This function could return strings which may contain characters which are reserved
as directives by the YAML parser, such as strings beginning with `%`. To avoid
issues when using the output of this function in an SLS file containing YAML+Jinja,
surround the call with single quotes.
'''
ret = get(name, None)