diff options
author | Felix Fontein <felix@fontein.de> | 2022-09-28 20:41:01 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-28 14:41:01 -0400 |
commit | 3423a6609f3bb2f0057f3b1bf04f1bfafaa066f3 (patch) | |
tree | bcf279a35942a5c5c2298bbdd8d01c3572f3b94b /lib/ansible | |
parent | 4b0697ee03ee02570b5e0c29ac73446959740515 (diff) | |
download | ansible-3423a6609f3bb2f0057f3b1bf04f1bfafaa066f3.tar.gz |
Fix docs for new commonpath and normpath filters (#78897)
Diffstat (limited to 'lib/ansible')
-rw-r--r-- | lib/ansible/plugins/filter/commonpath.yml | 7 | ||||
-rw-r--r-- | lib/ansible/plugins/filter/normpath.yml | 8 |
2 files changed, 8 insertions, 7 deletions
diff --git a/lib/ansible/plugins/filter/commonpath.yml b/lib/ansible/plugins/filter/commonpath.yml index 57603e1342..7075b731de 100644 --- a/lib/ansible/plugins/filter/commonpath.yml +++ b/lib/ansible/plugins/filter/commonpath.yml @@ -7,15 +7,16 @@ DOCUMENTATION: - Returns the longest common path from the given list of paths. options: _input: - description: A list of paths - type: list of path + description: A list of paths. + type: list + elements: path required: true seealso: - plugin: ansible.builtin.basename plugin_type: filter EXAMPLES: | - # To get the longest common path(ex. '/foo/bar') from the given list of paths(ex. ['/foo/bar/foobar','/foo/bar']) + # To get the longest common path (ex. '/foo/bar') from the given list of paths (ex. ['/foo/bar/foobar','/foo/bar']) {{ listofpaths | commonpath }} RETURN: diff --git a/lib/ansible/plugins/filter/normpath.yml b/lib/ansible/plugins/filter/normpath.yml index 92ad917d79..ec8b2cdd22 100644 --- a/lib/ansible/plugins/filter/normpath.yml +++ b/lib/ansible/plugins/filter/normpath.yml @@ -4,10 +4,10 @@ DOCUMENTATION: version_added: "2.15" short_description: Normalize a pathname description: - - Returns the normalized pathname by collapsing redundant separators and up-level references + - Returns the normalized pathname by collapsing redundant separators and up-level references. options: _input: - description: A path + description: A path. type: path required: true seealso: @@ -15,10 +15,10 @@ DOCUMENTATION: plugin_type: filter EXAMPLES: | - # To get a normalized path(ex. '/foo/bar') from the path(ex. '/foo//bar') + # To get a normalized path (ex. '/foo/bar') from the path (ex. '/foo//bar') {{ path | normpath }} RETURN: _value: description: The normalized path from the path given. - type: path
\ No newline at end of file + type: path |