Document future renaming of new rand_str jinja filter

The name and the documentation for this filter are entirely inaccurate
for what it actually does. It will be renamed in the Oxygen release.
This commit is contained in:
Erik Johnson 2017-07-21 09:21:38 -05:00
parent 81695a9f3c
commit 98b661406e

View File

@ -876,16 +876,22 @@ Returns:
------------
.. versionadded:: 2017.7.0
.. versionadded:: Oxygen
Renamed from ``rand_str`` to ``random_hash`` to more accurately describe
what the filter does.
Generate a random string and applies a hash. Default hashing: md5.
Generates a random number between 1 and the number passed to the filter, and
then hashes it. The default hash type is the one specified by the minion's
:conf_minion:`hash_type` config option, but an alternate hash type can be
passed to the filter as an argument.
Example:
.. code-block:: jinja
{% set passwd_length = 17 %}
{{ passwd_length | rand_str }}
{{ passwd_length | rand_str('sha512') }}
{% set num_range = 99999999 %}
{{ num_range | rand_str }}
{{ num_range | rand_str('sha512') }}
Returns: