From 2c87fe3b588826464c76ca69330eae4a495d9f22 Mon Sep 17 00:00:00 2001 From: nitzmahone Date: Wed, 17 Aug 2016 16:38:36 -0700 Subject: [PATCH] make the win_chocolatey force arg actually work fixes #1561 --- lib/ansible/modules/extras/windows/win_chocolatey.ps1 | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/ansible/modules/extras/windows/win_chocolatey.ps1 b/lib/ansible/modules/extras/windows/win_chocolatey.ps1 index bf5418abbe..546fc7621a 100644 --- a/lib/ansible/modules/extras/windows/win_chocolatey.ps1 +++ b/lib/ansible/modules/extras/windows/win_chocolatey.ps1 @@ -214,9 +214,14 @@ Function Choco-Install Choco-Upgrade -package $package -version $version -source $source -force $force ` -installargs $installargs -packageparams $packageparams ` -ignoredependencies $ignoredependencies + + return } - return + if (-not $force) + { + return + } } $cmd = "$executable install -dv -y $package"