Skip to content

realpath

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 1.8.

Synopsis

  • Resolves/follows symlinks to return the 'real path' from a given path.
  • Filters always run on the controller so this path is resolved using the controller's filesystem.

Parameters

Parameter Defaults / Choices Comments
_input
path
required
A path.

Examples

# realpath => /usr/bin/somebinary
realpath: {{ '/path/to/synlink' | realpath }}

Return Values

Key Data Type Description Returned
_value path The canonical path.

Authors

  • Darkone23 (@darkone23)