diff options
author | Brian Coca <bcoca@users.noreply.github.com> | 2018-12-19 09:49:18 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-19 09:49:18 -0500 |
commit | e0ed3674c5b312b39d59d81e78f4c0c6872f9bd6 (patch) | |
tree | 47d43b014e232df121b0cbd63e82170ed9fcb50e /docs/docsite/rst/user_guide/playbooks_filters.rst | |
parent | 65e35329acb19e26177beab17602cc43a3734eb3 (diff) | |
download | ansible-revert-50137-fix_random_filter_examples.tar.gz |
Revert "Fix incorrect examples with random filter (#50137)"revert-50137-fix_random_filter_examples
This reverts commit 9a7dbd52139f22c9c0e5f3f127efb0f8956c6f6a.
Diffstat (limited to 'docs/docsite/rst/user_guide/playbooks_filters.rst')
-rw-r--r-- | docs/docsite/rst/user_guide/playbooks_filters.rst | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/docs/docsite/rst/user_guide/playbooks_filters.rst b/docs/docsite/rst/user_guide/playbooks_filters.rst index 03ccdae7b2..d489f11fcb 100644 --- a/docs/docsite/rst/user_guide/playbooks_filters.rst +++ b/docs/docsite/rst/user_guide/playbooks_filters.rst @@ -395,7 +395,7 @@ To get a random item from a list:: To get a random number between 0 and a specified number:: - "{{ 59 | random }} * * * * root /script/from/cron" + "{{ 60 | random }} * * * * root /script/from/cron" # => '21 * * * * root /script/from/cron' Get a random number from 0 to 100 but in steps of 10:: @@ -412,7 +412,7 @@ Get a random number from 1 to 100 but in steps of 10:: As of Ansible version 2.3, it's also possible to initialize the random number generator from a seed. This way, you can create random-but-idempotent numbers:: - "{{ 59 | random(seed=inventory_hostname) }} * * * * root /script/from/cron" + "{{ 60 | random(seed=inventory_hostname) }} * * * * root /script/from/cron" Shuffle Filter |