From 07674a84466a671e983cd8c7d5d48ab7bea89ee0 Mon Sep 17 00:00:00 2001 From: Matt Davis Date: Mon, 13 Mar 2017 14:47:06 -0700 Subject: [PATCH] prevent winrm Add-Type debug noise from polluting stderr (#22583) --- lib/ansible/plugins/shell/powershell.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/ansible/plugins/shell/powershell.py b/lib/ansible/plugins/shell/powershell.py index 304ed910ccb..24f11e21eb6 100644 --- a/lib/ansible/plugins/shell/powershell.py +++ b/lib/ansible/plugins/shell/powershell.py @@ -315,6 +315,7 @@ Function Run($payload) { $password = $payload.become_password Add-Type -TypeDefinition $helper_def + Add-Type -TypeDefinition $helper_def -Debug:$false $exec_args = $null @@ -664,6 +665,7 @@ Function Run($payload) { [System.IO.Directory]::CreateDirectory([System.IO.Path]::GetDirectoryName($results_path)) | Out-Null Add-Type -TypeDefinition $native_process_util + Add-Type -TypeDefinition $native_process_util -Debug:$false # FUTURE: create under new job to ensure all children die on exit?