summaryrefslogtreecommitdiff
path: root/docs/docsite/rst/user_guide/playbooks_filters.rst
diff options
context:
space:
mode:
Diffstat (limited to 'docs/docsite/rst/user_guide/playbooks_filters.rst')
-rw-r--r--docs/docsite/rst/user_guide/playbooks_filters.rst4
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