mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-25 14:20:22 -07:00
Windows pslint: Re-enable PSPossibleIncorrectComparisonWithNull (#55065)
* pslint fixes * Fix up remaining sanity issues * now fix silly errors I made
This commit is contained in:
parent
a2eb227970
commit
025e9afe58
38 changed files with 269 additions and 272 deletions
|
@ -27,17 +27,17 @@ If (-not $sam_account_name.EndsWith("$")) {
|
|||
$enabled = Get-AnsibleParam -obj $params -name "enabled" -type "bool" -default $true
|
||||
$description = Get-AnsibleParam -obj $params -name "description" -default $null
|
||||
$domain_username = Get-AnsibleParam -obj $params -name "domain_username" -type "str"
|
||||
$domain_password = Get-AnsibleParam -obj $params -name "domain_password" -type "str" -failifempty ($domain_username -ne $null)
|
||||
$domain_password = Get-AnsibleParam -obj $params -name "domain_password" -type "str" -failifempty ($null -ne $domain_username)
|
||||
$domain_server = Get-AnsibleParam -obj $params -name "domain_server" -type "str"
|
||||
$state = Get-AnsibleParam -obj $params -name "state" -ValidateSet "present","absent" -default "present"
|
||||
|
||||
$extra_args = @{}
|
||||
if ($domain_username -ne $null) {
|
||||
if ($null -ne $domain_username) {
|
||||
$domain_password = ConvertTo-SecureString $domain_password -AsPlainText -Force
|
||||
$credential = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $domain_username, $domain_password
|
||||
$extra_args.Credential = $credential
|
||||
}
|
||||
if ($domain_server -ne $null) {
|
||||
if ($null -ne $domain_server) {
|
||||
$extra_args.Server = $domain_server
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue