From 8766641871390fce618cb2bace810f90b1d4c627 Mon Sep 17 00:00:00 2001 From: Tal Auslander Date: Mon, 6 Jul 2015 11:22:23 +0300 Subject: [PATCH] use ConvertTo-Bool for the force parameter --- lib/ansible/modules/windows/win_get_url.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ansible/modules/windows/win_get_url.ps1 b/lib/ansible/modules/windows/win_get_url.ps1 index 23463b681c0..02f19b39360 100644 --- a/lib/ansible/modules/windows/win_get_url.ps1 +++ b/lib/ansible/modules/windows/win_get_url.ps1 @@ -40,9 +40,9 @@ Else { Fail-Json $result "missing required argument: dest" } -$force = Get-Attr -obj $params -name "force" "no" +$force = Get-Attr -obj $params -name "force" "no" | ConvertTo-Bool -If ($force -eq "yes" -or -not (Test-Path $dest)) { +If ($force -or -not (Test-Path $dest)) { $client = New-Object System.Net.WebClient Try {