summaryrefslogtreecommitdiff
path: root/lib/ansible/plugins/filter/normpath.yml
blob: 9c845f690af2ed95c1c6a194dce840c6b93f4dbe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
DOCUMENTATION:
  name: normpath
  author: Shivam Durgbuns
  version_added: "2.15"
  short_description: Normalize a pathname
  description:
    - Returns the normalized pathname by collapsing redundant separators and up-level references.
  options:
    _input:
      description: A path.
      type: path
      required: true
  seealso:
    - plugin: ansible.builtin.basename
      plugin_type: filter
EXAMPLES: |

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

RETURN:
  _value:
    description: The normalized path from the path given.
    type: path