Add seed parameter to random_mac filter (#51841)

This commit is contained in:
s-hamann 2019-05-16 17:41:08 +00:00 committed by Nathaniel Case
parent a910d19533
commit 730456b402
3 changed files with 17 additions and 3 deletions

View file

@ -378,6 +378,10 @@ To get a random MAC address from a string prefix starting with '52:54:00'::
Note that if anything is wrong with the prefix string, the filter will issue an error.
As of Ansible version 2.9, it's also possible to initialize the random number generator from a seed. This way, you can create random-but-idempotent MAC addresses::
"{{ '52:54:00' | random_mac(seed=inventory_hostname) }}"
.. _random_filter:
Random Number Filter