mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 21:00:22 -07: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:
parent
5afc0d0c58
commit
7be39ca553
11 changed files with 22 additions and 22 deletions
|
@ -42,7 +42,7 @@ $method = Get-AnsibleParam -obj $params "method" -default "GET"
|
|||
$content_type = Get-AnsibleParam -obj $params -name "content_type"
|
||||
$headers = Get-AnsibleParam -obj $params -name "headers"
|
||||
$body = Get-AnsibleParam -obj $params -name "body"
|
||||
$dest = Get-AnsibleParam -obj $params -name "dest" -default $null
|
||||
$dest = Get-AnsibleParam -obj $params -name "dest" -type "path" -default $null
|
||||
$use_basic_parsing = ConvertTo-Bool (Get-AnsibleParam -obj $params -name "use_basic_parsing" -default $true)
|
||||
|
||||
$webrequest_opts.Uri = $url
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue