From 91b42d62fa26f93903b4c401ef86b9e758564e11 Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Thu, 25 Feb 2021 17:11:16 -0500 Subject: [PATCH] another useful example (#73728) --- docs/docsite/rst/user_guide/complex_data_manipulation.rst | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docs/docsite/rst/user_guide/complex_data_manipulation.rst b/docs/docsite/rst/user_guide/complex_data_manipulation.rst index 87c4f75d153..9f10984a250 100644 --- a/docs/docsite/rst/user_guide/complex_data_manipulation.rst +++ b/docs/docsite/rst/user_guide/complex_data_manipulation.rst @@ -94,6 +94,13 @@ There are several ways to do it in Ansible, this is just one example: } +.. code-block:: YAML+Jinja + :caption: Get the unique list of values of a variable that vary per host + + vars: + unique_value_list: "{{ groups['all'] | map ('extract', hostvars, 'varname') | list | unique}}" + + .. _find_mount_point: Find mount point