summaryrefslogtreecommitdiff
path: root/windows/win_acl_inheritance.ps1
diff options
context:
space:
mode:
authorHans-Joachim Kliemeck <git@kliemeck.de>2015-10-21 21:20:44 +0200
committerHans-Joachim Kliemeck <git@kliemeck.de>2015-10-21 21:20:44 +0200
commit8de49a5deaa2827407183e8680007e922c19b5d6 (patch)
treebc66271779f82451855a17a03082e932301fabde /windows/win_acl_inheritance.ps1
parent95862793d0c00ee946ed891a021b8569cae9feab (diff)
downloadansible-modules-extras-8de49a5deaa2827407183e8680007e922c19b5d6.tar.gz
suggestions by @marcind
Diffstat (limited to 'windows/win_acl_inheritance.ps1')
-rw-r--r--windows/win_acl_inheritance.ps14
1 files changed, 2 insertions, 2 deletions
diff --git a/windows/win_acl_inheritance.ps1 b/windows/win_acl_inheritance.ps1
index e72570ba..674180e3 100644
--- a/windows/win_acl_inheritance.ps1
+++ b/windows/win_acl_inheritance.ps1
@@ -26,7 +26,7 @@ $result = New-Object PSObject;
Set-Attr $result "changed" $false;
$path = Get-Attr $params "path" -failifempty $true
-$copy = Get-Attr $params "copy" "no" -validateSet "no","yes" -resultobj $result
+$copy = Get-Attr $params "copy" "no" -validateSet "no","yes" -resultobj $result | ConvertTo-Bool
If (-Not (Test-Path -Path $path)) {
Fail-Json $result "$path file or directory does not exist on the host"
@@ -36,7 +36,7 @@ Try {
$objACL = Get-ACL $path
$alreadyDisabled = !$objACL.AreAccessRulesProtected
- If ($copy -eq "yes") {
+ If ($copy) {
$objACL.SetAccessRuleProtection($True, $True)
} Else {
$objACL.SetAccessRuleProtection($True, $False)