Skip to content

normpath

Collection Note

This module is part of the ansible.builtin collection. To install the collection, use:

ansible-galaxy collection install ansible.builtin
Added in version 2.15.

Synopsis

  • Returns the normalized pathname by collapsing redundant separators and up-level references.

Parameters

Parameter Defaults / Choices Comments
_input
path
required
A path.

Examples

# To get a normalized path (for example - '/foo/bar') from the path (for example - '/foo//bar')
{{ path | normpath }}

Return Values

Key Data Type Description Returned
_value path The normalized path from the path given.

Authors

  • Shivam Durgbuns