| Server IP : 157.22.201.140 / Your IP : 216.73.216.74 Web Server : nginx/1.30.1 System : Linux mit.vincode.fvds.ru 6.8.0-111-generic #111-Ubuntu SMP PREEMPT_DYNAMIC Sat Apr 11 23:16:02 UTC 2026 x86_64 User : root ( 0) PHP Version : 8.3.6 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /lib/python3/dist-packages/ansible/plugins/filter/ |
Upload File : |
DOCUMENTATION:
name: commonpath
author: Shivam Durgbuns
version_added: "2.15"
short_description: gets the common path
description:
- Returns the longest common path from the given list of paths.
options:
_input:
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 (for example - '/foo/bar') from the given list of paths
# (for example - ['/foo/bar/foobar','/foo/bar'])
{{ listofpaths | commonpath }}
RETURN:
_value:
description: The longest common path from the given list of paths.
type: path