mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 06:12:51 +00:00
Merge pull request #12024 from jhawkesworth/win_splitdrive_filter
Add win_splitdrive filter for windows users
This commit is contained in:
@@ -342,6 +342,18 @@ To get the last name of a windows style file path (new in version 2.0)::
|
||||
|
||||
{{ path | win_basename }}
|
||||
|
||||
To separate the windows drive letter from the rest of a file path (new in version 2.0)::
|
||||
|
||||
{{ path | win_splitdrive }}
|
||||
|
||||
To get only the windows drive letter
|
||||
|
||||
{{ path | win_splitdrive | first }}
|
||||
|
||||
To get the rest of the path without the drive letter
|
||||
|
||||
{{ path | win_splitdrive | last }}
|
||||
|
||||
To get the directory from a path::
|
||||
|
||||
{{ path | dirname }}
|
||||
|
||||
Reference in New Issue
Block a user