summaryrefslogtreecommitdiff
path: root/lib/ansible/plugins/filter/dirname.yml
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ansible/plugins/filter/dirname.yml')
-rw-r--r--lib/ansible/plugins/filter/dirname.yml4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/ansible/plugins/filter/dirname.yml b/lib/ansible/plugins/filter/dirname.yml
index 52f7d5d42e..4b8b0f7b29 100644
--- a/lib/ansible/plugins/filter/dirname.yml
+++ b/lib/ansible/plugins/filter/dirname.yml
@@ -5,6 +5,8 @@ DOCUMENTATION:
short_description: get a path's directory name
description:
- Returns the 'head' component of a path, basically everything that is not the 'basename'.
+ notes:
+ - The result of this filter is different from the Unix dirname program; where dirname for C(/foo/bar/) returns C(/foo), the dirname filter returns the full path (C(/foo/bar/)).
options:
_input:
description: A path.
@@ -15,7 +17,7 @@ DOCUMENTATION:
plugin_type: filter
EXAMPLES: |
- # To get the dir name of a file path, like '/etc/asdf' out of '/etc/asdf/foo.txt'
+ # To get the dir name of a file path, like '/etc/asdf' out of '/etc/asdf/foo.txt'.
{{ mypath | dirname }}
RETURN: