1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2026-06-12 11:05:38 +00:00

[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 97b464deb3)

Co-authored-by: juremedvesek <jure.medvesek@xlab.si>
This commit is contained in:
patchback[bot] 2026-06-02 21:18:20 +02:00 committed by GitHub
parent eed2e1d2ac
commit e3816514a8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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']
"""