From bdf0a888bbd8aff117422ff74ec6988a4b7c036d Mon Sep 17 00:00:00 2001 From: Hans-Joachim Kliemeck Date: Wed, 21 Oct 2015 21:20:44 +0200 Subject: [PATCH] suggestions by @marcind --- lib/ansible/modules/extras/windows/win_acl_inheritance.ps1 | 4 ++-- lib/ansible/modules/extras/windows/win_acl_inheritance.py | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/ansible/modules/extras/windows/win_acl_inheritance.ps1 b/lib/ansible/modules/extras/windows/win_acl_inheritance.ps1 index e72570ba3a..674180e33b 100644 --- a/lib/ansible/modules/extras/windows/win_acl_inheritance.ps1 +++ b/lib/ansible/modules/extras/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) diff --git a/lib/ansible/modules/extras/windows/win_acl_inheritance.py b/lib/ansible/modules/extras/windows/win_acl_inheritance.py index 784aa5f987..d55473491b 100644 --- a/lib/ansible/modules/extras/windows/win_acl_inheritance.py +++ b/lib/ansible/modules/extras/windows/win_acl_inheritance.py @@ -27,7 +27,7 @@ module: win_acl_inheritance version_added: "2.0" short_description: Disable ACL inheritance description: - - Disable ACL inheritance and optionally converts ACE to dedicated ACE + - Disable ACL (Access Control List) inheritance and optionally converts ACE (Access Control Entry) to dedicated ACE options: path: description: @@ -48,12 +48,12 @@ EXAMPLES = ''' # Playbook example --- - name: Disable and copy - win_owner: + win_acl_inheritance: path: 'C:\\apache\\' copy: yes - name: Disable - win_owner: + win_acl_inheritance: path: 'C:\\apache\\' copy: no '''