mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-06-01 13:56:55 +00:00
* win_security_policy: allow removing values (resolves #40869) * Removing warning * Adding test for remove policy setting * Fixing string comparison
This commit is contained in:
parent
1401fa74cc
commit
f2bd6b6bfd
2 changed files with 40 additions and 0 deletions
|
|
@ -194,6 +194,8 @@ if ($will_change -eq $true) {
|
|||
if ($new_value -cne $value) {
|
||||
Fail-Json $result "Failed to change the value for key '$key' in section '$section', the value is still $new_value"
|
||||
}
|
||||
} elseif ([string]$value -eq "") {
|
||||
# Value was empty, so OK if no longer in the result
|
||||
} else {
|
||||
Fail-Json $result "The key '$key' in section '$section' is not a valid key, cannot set this value"
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue