mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Docs edit for #18477.
This commit is contained in:
parent
96ddd29c7e
commit
b5442577ce
1 changed files with 1 additions and 2 deletions
|
@ -168,8 +168,7 @@ Get a random number from 1 to 100 but in steps of 10::
|
||||||
{{ 100 |random(1, 10) }} => 31
|
{{ 100 |random(1, 10) }} => 31
|
||||||
{{ 100 |random(start=1, step=10) }} => 51
|
{{ 100 |random(start=1, step=10) }} => 51
|
||||||
|
|
||||||
It's also possible to initialize random number generator from seed. This way, you can create random-but-idempotent
|
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::
|
||||||
numbers (new in version 2.3)::
|
|
||||||
|
|
||||||
{{ 59 |random(seed=inventory_hostname) }} * * * * root /script/from/cron
|
{{ 59 |random(seed=inventory_hostname) }} * * * * root /script/from/cron
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue