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. - Returns the longest common path from the given list of paths.
options: options:
_input: _input:
description: A list of paths description: A list of paths.
type: list of path type: list
elements: path
required: true required: true
seealso: seealso:
- plugin: ansible.builtin.basename - plugin: ansible.builtin.basename
plugin_type: filter plugin_type: filter
EXAMPLES: | 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 }} {{ listofpaths | commonpath }}
RETURN: RETURN:

@ -4,10 +4,10 @@ DOCUMENTATION:
version_added: "2.15" version_added: "2.15"
short_description: Normalize a pathname short_description: Normalize a pathname
description: 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: options:
_input: _input:
description: A path description: A path.
type: path type: path
required: true required: true
seealso: seealso:
@ -15,10 +15,10 @@ DOCUMENTATION:
plugin_type: filter plugin_type: filter
EXAMPLES: | 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 }} {{ path | normpath }}
RETURN: RETURN:
_value: _value:
description: The normalized path from the path given. description: The normalized path from the path given.
type: path type: path

Loading…
Cancel
Save