Windows: Add "special" parameter types to docs (#42853)

* Windows: Add special parameter types

Adding explicit parameter types now exposes this information in the
module documentation, and proves really helpful.

We only do this for non-string types as strings, mostly because strings
are implicit.

PS We also make copyright statements consistent and use #Requires for
explicit library imports

* Type "string" must be type "str"

* A few more Copyright corrections

* More fixes

* Don't add file encoding to Powershell files

* Don't add missing interfacetypes parameter

Otherwise CI demands an incorrect version_added

* Small fix
This commit is contained in:
Dag Wieers 2018-07-17 23:29:05 +02:00 committed by Matt Davis
commit 95a1170908
127 changed files with 327 additions and 664 deletions

View file

@ -1,10 +1,8 @@
#!powershell
# This file is part of Ansible
# Copyright: (c) 2017, Erwan Quelin (@equelin) <erwan.quelin@gmail.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# Author: Erwan Quelin (mail:erwan.quelin@gmail.com - GitHub: @equelin - Twitter: @erwanquelin)
#Requires -Module Ansible.ModuleUtils.Legacy
$ErrorActionPreference = 'Stop'
@ -15,8 +13,8 @@ $diff_mode = Get-AnsibleParam -obj $params -name "_ansible_diff" -type "bool" -d
# Modules parameters
$path = Get-AnsibleParam -obj $params -name "path" -type "string" -failifempty $true
$minimum_version = Get-AnsibleParam -obj $params -name "minimum_version" -type "string" -failifempty $false
$path = Get-AnsibleParam -obj $params -name "path" -type "str" -failifempty $true
$minimum_version = Get-AnsibleParam -obj $params -name "minimum_version" -type "str" -failifempty $false
$result = @{
changed = $false
@ -102,4 +100,4 @@ If (Test-Path -LiteralPath $path -PathType Leaf) {
$result.changed = $true
Exit-Json -obj $result
Exit-Json -obj $result