From 3423a6609f3bb2f0057f3b1bf04f1bfafaa066f3 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Wed, 28 Sep 2022 20:41:01 +0200 Subject: [PATCH] Fix docs for new commonpath and normpath filters (#78897) --- lib/ansible/plugins/filter/commonpath.yml | 7 ++++--- lib/ansible/plugins/filter/normpath.yml | 8 ++++---- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/lib/ansible/plugins/filter/commonpath.yml b/lib/ansible/plugins/filter/commonpath.yml index 57603e13420..7075b731de2 100644 --- a/lib/ansible/plugins/filter/commonpath.yml +++ b/lib/ansible/plugins/filter/commonpath.yml @@ -7,15 +7,16 @@ DOCUMENTATION: - Returns the longest common path from the given list of paths. options: _input: - description: A list of paths - type: list of path + description: A list of paths. + type: list + elements: path required: true seealso: - plugin: ansible.builtin.basename plugin_type: filter EXAMPLES: | - # To get the longest common path(ex. '/foo/bar') from the given list of paths(ex. ['/foo/bar/foobar','/foo/bar']) + # To get the longest common path (ex. '/foo/bar') from the given list of paths (ex. ['/foo/bar/foobar','/foo/bar']) {{ listofpaths | commonpath }} RETURN: diff --git a/lib/ansible/plugins/filter/normpath.yml b/lib/ansible/plugins/filter/normpath.yml index 92ad917d796..ec8b2cdd225 100644 --- a/lib/ansible/plugins/filter/normpath.yml +++ b/lib/ansible/plugins/filter/normpath.yml @@ -4,10 +4,10 @@ DOCUMENTATION: version_added: "2.15" short_description: Normalize a pathname description: - - Returns the normalized pathname by collapsing redundant separators and up-level references + - Returns the normalized pathname by collapsing redundant separators and up-level references. options: _input: - description: A path + description: A path. type: path required: true seealso: @@ -15,10 +15,10 @@ DOCUMENTATION: plugin_type: filter EXAMPLES: | - # To get a normalized path(ex. '/foo/bar') from the path(ex. '/foo//bar') + # To get a normalized path (ex. '/foo/bar') from the path (ex. '/foo//bar') {{ path | normpath }} RETURN: _value: description: The normalized path from the path given. - type: path \ No newline at end of file + type: path