diff options
author | s-hamann <10639154+s-hamann@users.noreply.github.com> | 2019-05-16 17:41:08 +0000 |
---|---|---|
committer | Nathaniel Case <ncase@redhat.com> | 2019-05-16 13:41:08 -0400 |
commit | 730456b402fb7cf4182938c41403214112c5933c (patch) | |
tree | 276bde67fe845c03e9df2c846d6eb981e289961a /docs | |
parent | a910d195339d2386829eb404c1df06ecb5ff1f1b (diff) | |
download | ansible-730456b402fb7cf4182938c41403214112c5933c.tar.gz |
Add seed parameter to random_mac filter (#51841)
Diffstat (limited to 'docs')
-rw-r--r-- | docs/docsite/rst/user_guide/playbooks_filters.rst | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/docs/docsite/rst/user_guide/playbooks_filters.rst b/docs/docsite/rst/user_guide/playbooks_filters.rst index 6b55c0d48f..f7af25c143 100644 --- a/docs/docsite/rst/user_guide/playbooks_filters.rst +++ b/docs/docsite/rst/user_guide/playbooks_filters.rst @@ -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 |