diff options
author | Hans-Joachim Kliemeck <git@kliemeck.de> | 2015-10-21 21:20:44 +0200 |
---|---|---|
committer | Hans-Joachim Kliemeck <git@kliemeck.de> | 2015-10-21 21:20:44 +0200 |
commit | 8de49a5deaa2827407183e8680007e922c19b5d6 (patch) | |
tree | bc66271779f82451855a17a03082e932301fabde /windows/win_acl_inheritance.ps1 | |
parent | 95862793d0c00ee946ed891a021b8569cae9feab (diff) | |
download | ansible-modules-extras-8de49a5deaa2827407183e8680007e922c19b5d6.tar.gz |
suggestions by @marcind
Diffstat (limited to 'windows/win_acl_inheritance.ps1')
-rw-r--r-- | windows/win_acl_inheritance.ps1 | 4 |
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) |