summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorๆž—ๅšไป Buo-ren Lin <Buo.Ren.Lin@gmail.com>2024-09-24 17:33:25 +0200
committerGitHub <noreply@github.com>2024-09-24 17:33:25 +0200
commit8caa32a558262efd52a75af087a0932dc5922f8a (patch)
tree530dfad0ea7d45d040a3908a109c3b5dd7cc8bd3
parentAdd basic validation for action_groups (#83965) (diff)
downloadansible-8caa32a558262efd52a75af087a0932dc5922f8a.tar.xz
ansible-8caa32a558262efd52a75af087a0932dc5922f8a.zip
split: Fix incorrect example result of the split builtin filter (#83982)
The following Python output proves that the second member of the resulting list should be " a", not "a": ```txt $ python3 Python 3.12.3 (main, Sep 11 2024, 14:17:37) [GCC 13.2.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> string = "jojo is, a" >>> string.split(',') ['jojo is', ' a'] ```
-rw-r--r--lib/ansible/plugins/filter/split.yml2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ansible/plugins/filter/split.yml b/lib/ansible/plugins/filter/split.yml
index 0fc9c50b3c..e954ef2b0d 100644
--- a/lib/ansible/plugins/filter/split.yml
+++ b/lib/ansible/plugins/filter/split.yml
@@ -22,7 +22,7 @@ EXAMPLES: |
# listjojo => [ "jojo", "is", "a" ]
listjojo: "{{ 'jojo is a' | split }}"
- # listjojocomma => [ "jojo is", "a" ]
+ # listjojocomma => [ "jojo is", " a" ]
listjojocomma: "{{ 'jojo is, a' | split(',') }}"
RETURN: