Add arg and doc validation for PowerShell modules (#53615)

* Add arg and doc validation for PowerShell modules

* Verify if pwsh exists before running it
This commit is contained in:
Jordan Borean 2019-03-12 07:56:51 +10:00 committed by GitHub
commit f297229b52
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 159 additions and 11 deletions

View file

@ -24,7 +24,7 @@ $spec = @{
ignore_dependencies = @{ type = "bool"; default = $false }
force = @{ type = "bool"; default = $false }
name = @{ type = "list"; elements = "str"; required = $true }
package_params = @{ type = "str"; aliases = "params" }
package_params = @{ type = "str"; aliases = @("params") }
pinned = @{ type = "bool" }
proxy_url = @{ type = "str" }
proxy_username = @{ type = "str" }
@ -34,7 +34,7 @@ $spec = @{
source_username = @{ type = "str" }
source_password = @{ type = "str"; no_log = $true }
state = @{ type = "str"; default = "present"; choices = "absent", "downgrade", "latest", "present", "reinstalled" }
timeout = @{ type = "int"; default = 2700; aliases = "execution_timeout" }
timeout = @{ type = "int"; default = 2700; aliases = @("execution_timeout") }
validate_certs = @{ type = "bool"; default = $true }
version = @{ type = "str" }
}

View file

@ -90,7 +90,7 @@ options:
- md5
- sha1
- sha256
- sha385
- sha384
- sha512
default: sha1
version_added: "2.8"

View file

@ -29,6 +29,10 @@ options:
- The location of the PsExec utility (in case it is not located in your PATH).
type: path
default: psexec.exe
extra_opts:
description:
- Specify additional options to add onto the PsExec invocation.
type: list
hostnames:
description:
- The hostnames to run the command.

View file

@ -38,7 +38,6 @@ options:
- If the requested voice is not available the default voice will be used.
Example voice names from Windows 10 are C(Microsoft Zira Desktop) and C(Microsoft Hazel Desktop).
type: str
default: system default voice
speech_speed:
description:
- How fast or slow to speak the text.

View file

@ -26,6 +26,7 @@ options:
back slashes are accepted.
type: path
required: yes
aliases: [ dest, name ]
get_md5:
description:
- Whether to return the checksum sum of the file. Between Ansible 1.9

View file

@ -29,6 +29,7 @@ options:
- If path is not specified default system temporary directory (%TEMP%) will be used.
type: path
default: '%TEMP%'
aliases: [ dest ]
prefix:
description:
- Prefix of file/directory name created by module.

View file

@ -91,7 +91,7 @@ options:
- A valid, numeric, HTTP status code that signifies success of the request.
- Can also be comma separated list of status codes.
type: list
default: 200
default: [ 200 ]
version_added: '2.4'
timeout:
description:
@ -123,7 +123,7 @@ options:
or C(follow_redirects) is set to C(none),
or set to C(safe) when not doing C(GET) or C(HEAD) it prevents all redirection.
type: int
default: 5
default: 50
version_added: '2.4'
validate_certs:
description:

View file

@ -23,7 +23,7 @@ options:
process_name_exact:
description:
- The name of the process(es) for which to wait.
type: str
type: list
process_name_pattern:
description:
- RegEx pattern matching desired process(es).