mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
fix: win-environment strict-mode fixes
This commit is contained in:
parent
572b6669c4
commit
820d5a7a3e
1 changed files with 3 additions and 2 deletions
|
@ -20,11 +20,12 @@
|
|||
# POWERSHELL_COMMON
|
||||
|
||||
$params = Parse-Args $args;
|
||||
$state = Get-Attr $params "state" $null;
|
||||
$result = New-Object PSObject;
|
||||
Set-Attr $result "changed" $false;
|
||||
|
||||
If ($params.state) {
|
||||
$state = $params.state.ToString().ToLower()
|
||||
If ($state) {
|
||||
$state = $state.ToString().ToLower()
|
||||
If (($state -ne 'present') -and ($state -ne 'absent') ) {
|
||||
Fail-Json $result "state is '$state'; must be 'present', or 'absent'"
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue