|
|
|
@ -138,6 +138,8 @@ Try {
|
|
|
|
|
$permissionFull = Get-AnsibleParam -obj $params -name "full" -type "str" -default "" | NormalizeAccounts
|
|
|
|
|
$permissionDeny = Get-AnsibleParam -obj $params -name "deny" -type "str" -default "" | NormalizeAccounts
|
|
|
|
|
|
|
|
|
|
$cachingMode = Get-Attr $params "caching_mode" "" -validateSet "BranchCache","Documents","Manual","None","Programs", "Unkown"
|
|
|
|
|
|
|
|
|
|
If (-Not (Test-Path -Path $path)) {
|
|
|
|
|
Fail-Json $result "$path directory does not exist on the host"
|
|
|
|
|
}
|
|
|
|
@ -170,6 +172,10 @@ Try {
|
|
|
|
|
Set-SmbShare -Force -Name $name -FolderEnumerationMode $folderEnum
|
|
|
|
|
$result.changed = $true
|
|
|
|
|
}
|
|
|
|
|
if ($share.CachingMode -ne $cachingMode) {
|
|
|
|
|
Set-SmbShare -Force -Name $name -CachingMode $cachingMode
|
|
|
|
|
Set-Attr $result "changed" $true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# clean permissions that imply others
|
|
|
|
|
ForEach ($user in $permissionFull) {
|
|
|
|
|