summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorBaptiste Mille-Mathias <baptiste.millemathias@gmail.com>2021-03-27 00:18:55 +0100
committerGitHub <noreply@github.com>2021-03-27 00:18:55 +0100
commit99a6627c60d8734d90f6982107eebb9de24ba54d (patch)
tree7e10fcd138b8af29614efa809ca9ba406c53b06e /docs
parentdef2870df7f4585ca8c026bae2dd42e815041552 (diff)
downloadansible-99a6627c60d8734d90f6982107eebb9de24ba54d.tar.gz
Add duplicated set filter and documentation (#72729)
Co-authored-by: Kerry <kerry@flatline-studios.com>
Diffstat (limited to 'docs')
-rw-r--r--docs/docsite/rst/user_guide/playbooks_filters.rst8
1 files changed, 8 insertions, 0 deletions
diff --git a/docs/docsite/rst/user_guide/playbooks_filters.rst b/docs/docsite/rst/user_guide/playbooks_filters.rst
index 984de55e4b..9ea4104440 100644
--- a/docs/docsite/rst/user_guide/playbooks_filters.rst
+++ b/docs/docsite/rst/user_guide/playbooks_filters.rst
@@ -978,6 +978,14 @@ To get the symmetric difference of 2 lists (items exclusive to each list)::
{{ list1 | symmetric_difference(list2) }}
# => [10, 11, 99]
+To get the duplicate values from a list (the resulting list contains unique duplicates)::
+
+.. versionadded:: 2.11
+
+ # list1: [1, 2, 5, 1, 3, 4, 10, 'a', 'z', 'a']
+ {{ list1 | duplicated }}
+ # => [1, 'a']
+
.. _math_stuff:
Calculating numbers (math)