From efb29d64367fc939d78050c066e56c77e94312fd Mon Sep 17 00:00:00 2001 From: Tim Small Date: Mon, 20 Jun 2016 22:30:10 +0100 Subject: [PATCH] Allow parameters to be passed for uninstall (required by some packages) (#2269) --- lib/ansible/modules/extras/windows/win_chocolatey.ps1 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/ansible/modules/extras/windows/win_chocolatey.ps1 b/lib/ansible/modules/extras/windows/win_chocolatey.ps1 index 301ffe1a64b..e725519b991 100644 --- a/lib/ansible/modules/extras/windows/win_chocolatey.ps1 +++ b/lib/ansible/modules/extras/windows/win_chocolatey.ps1 @@ -288,6 +288,11 @@ Function Choco-Uninstall $cmd += " -force" } + if ($packageparams) + { + $cmd += " -params '$packageparams'" + } + $results = invoke-expression $cmd if ($LastExitCode -notin $successexitcodes)