summaryrefslogtreecommitdiff
path: root/windows/win_owner.ps1
diff options
context:
space:
mode:
authorHans-Joachim Kliemeck <git@kliemeck.de>2016-03-21 17:49:51 +0100
committerHans-Joachim Kliemeck <git@kliemeck.de>2016-03-21 17:49:51 +0100
commit1c097f9495c70fa0067a9edfb0ffa5fdd873cfad (patch)
tree3510556fce95ea9650f69db285ed97b52b7f1583 /windows/win_owner.ps1
parentd5ab52eb58f48c1ba7d2cefeb610c415e440cb1c (diff)
downloadansible-modules-extras-1c097f9495c70fa0067a9edfb0ffa5fdd873cfad.tar.gz
suggestion by @nitzmahone, to not use Get-Attr in combination with ConvertTo-Bool
Diffstat (limited to 'windows/win_owner.ps1')
-rw-r--r--windows/win_owner.ps13
1 files changed, 2 insertions, 1 deletions
diff --git a/windows/win_owner.ps1 b/windows/win_owner.ps1
index d781dd01..076ab846 100644
--- a/windows/win_owner.ps1
+++ b/windows/win_owner.ps1
@@ -88,7 +88,8 @@ Set-Attr $result "changed" $false;
$path = Get-Attr $params "path" -failifempty $true
$user = Get-Attr $params "user" -failifempty $true
-$recurse = Get-Attr $params "recurse" "no" -validateSet "no","yes" -resultobj $result | ConvertTo-Bool
+$recurse = Get-Attr $params "recurse" "no" -validateSet "no","yes" -resultobj $result
+$recurse = $recurse | ConvertTo-Bool
If (-Not (Test-Path -Path $path)) {
Fail-Json $result "$path file or directory does not exist on the host"