From e3816514a8849e80addf46b8dabb4ab09e855501 Mon Sep 17 00:00:00 2001 From: "patchback[bot]" <45432694+patchback[bot]@users.noreply.github.com> Date: Tue, 2 Jun 2026 21:18:20 +0200 Subject: [PATCH] [PR #12167/97b464de backport][stable-12] version_sort filter: fix example's description (#12170) version_sort filter: fix example's description (#12167) Fix description in example of community.general.version_sort filter Example had some left overs, that were not aligned with code. It was explaining conversion between tuples and dict. But example here maps list of strings to list of strings. (cherry picked from commit 97b464deb35f95fe1128b88f52451703289c0cf7) Co-authored-by: juremedvesek --- plugins/filter/version_sort.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/filter/version_sort.py b/plugins/filter/version_sort.py index 64c3a3d573..be6b99e1c0 100644 --- a/plugins/filter/version_sort.py +++ b/plugins/filter/version_sort.py @@ -20,9 +20,9 @@ options: """ EXAMPLES = r""" -- name: Convert list of tuples into dictionary +- name: Sort a list of strings by version ansible.builtin.set_fact: - dictionary: "{{ ['2.1', '2.10', '2.9'] | community.general.version_sort }}" + sorted_list: "{{ ['2.1', '2.10', '2.9'] | community.general.version_sort }}" # Result is ['2.1', '2.9', '2.10'] """