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