ansible.builtin.dirname (v2.16.0) — filter

get a path's directory name

| "added in version" historical of ansible.builtin"

Authors: ansible core team

Install Ansible via pip

Install with pip install ansible-core==2.16.0

Description

Returns the 'head' component of a path, basically everything that is not the 'basename'.

Inputs

    
_input:
    description: A path.
    required: true
    type: path

Outputs

_value:
  description: The directory portion of the original path.
  type: path

See also