Fix docs for new commonpath and normpath filters (#78897)

pull/78916/head
Felix Fontein 2 years ago committed by GitHub
parent 4b0697ee03
commit 3423a6609f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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:

@ -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
type: path

Loading…
Cancel
Save