1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2026-06-11 02:25:36 +00:00

[PR #12167/97b464de backport][stable-13] version_sort filter: fix example's description (#12171)

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:37 +02:00 committed by GitHub
parent f414c77e17
commit 1642519493
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']
"""