From 427f0ad859da2751e97509db76d929685a2cde6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Geeraerts?= <10222438+b-enoit-be@users.noreply.github.com> Date: Mon, 11 Mar 2024 12:27:49 +0100 Subject: [PATCH] The extension returned by the splitext contains the dot; fixed the last example and aligned its syntax to the others --- lib/ansible/plugins/filter/splitext.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/ansible/plugins/filter/splitext.yml b/lib/ansible/plugins/filter/splitext.yml index 5f9469284f8..56d5c30a57c 100644 --- a/lib/ansible/plugins/filter/splitext.yml +++ b/lib/ansible/plugins/filter/splitext.yml @@ -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: