mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 05:42:50 +00:00
Windows modules: Add -type "path" to path parameters (#20282)
This PR is based on #20164 functionality to specify the parameter type (e.g. as done for python modules). In this case only -type "path" has a specific meaning, as it will expand environment variables for paths. Which is typically done on Windows. So you can do: - win_copy: src: files/some.doc dest: '%UserProfile%\My Documents'
This commit is contained in:
@@ -44,7 +44,7 @@ $result = New-Object psobject @{
|
||||
};
|
||||
|
||||
# failifempty = $false is default and thus implied
|
||||
$factpath = Get-AnsibleParam -obj $params -name fact_path
|
||||
$factpath = Get-AnsibleParam -obj $params -name fact_path -type "path"
|
||||
if ($factpath -ne $null) {
|
||||
# Get any custom facts
|
||||
Get-CustomFacts -factpath $factpath
|
||||
|
||||
Reference in New Issue
Block a user