win_domain_user - MAke the query user try catch block more accurate (#58782)

* win_domain_user - MAke the query user try catch block more accurate for missing identity

* change to minor_changes

* Update win_domain_user-make-query-try-catch-accurate.yml

* Update win_domain_user-make-query-try-catch-accurate.yml
pull/58803/head
Shachaf92 5 years ago committed by Jordan Borean
parent 6e4c2c61bd
commit 5b953581b4

@ -0,0 +1,2 @@
minor_changes:
- "win_domain_user - Make the query user try catch block more accurate for missing identity (https://github.com/ansible/ansible/issues/57719)"

@ -80,7 +80,7 @@ if ($null -ne $domain_server) {
try {
$user_obj = Get-ADUser -Identity $username -Properties * @extra_args
}
catch {
catch [Microsoft.ActiveDirectory.Management.ADIdentityNotFoundException] {
$user_obj = $null
}

Loading…
Cancel
Save