# ansible.builtin.commonpath
Returns the longest common path from the given list of paths.

## Examples
```yml
# 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 }}
```