[stable-2.17] The extension returned by the splitext contains the dot (#83335)

Fixed examples for splitext filter plugin

(cherry picked from commit 454dd9e91d)

Co-authored-by: Benoît Geeraerts <10222438+b-enoit-be@users.noreply.github.com>
pull/83398/head
Abhijeet Kasurde 6 months ago committed by GitHub
parent d8b4ff1684
commit 122d11491f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -14,14 +14,14 @@ DOCUMENTATION:
EXAMPLES: |
# gobble => [ '/etc/make', 'conf' ]
# gobble => [ '/etc/make', '.conf' ]
gobble: "{{ '/etc/make.conf' | splitext }}"
# file_n_ext => [ 'ansible', 'cfg' ]
# file_n_ext => [ 'ansible', '.cfg' ]
file_n_ext: "{{ 'ansible.cfg' | splitext }}"
# hoax => ['/etc/hoasdf', '']
hoax: '{{ "/etc//hoasdf/" | splitext }}'
# hoax => [ '/etc/hoasdf', '' ]
hoax: "{{ '/etc/hoasdf' | splitext }}"
RETURN:
_value:

Loading…
Cancel
Save