1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

win_share: tweaks after the caching mode changes (#22763)

* win_share: tweaks after the caching mode changes

* Re-added the Unknown option back in
This commit is contained in:
Jordan Borean 2017-03-24 08:08:53 +10:00 committed by Matt Davis
parent 2fff690caa
commit 89b78cb5e8
2 changed files with 6 additions and 19 deletions

View file

@ -138,7 +138,7 @@ Try {
$permissionFull = Get-AnsibleParam -obj $params -name "full" -type "str" -default "" | NormalizeAccounts $permissionFull = Get-AnsibleParam -obj $params -name "full" -type "str" -default "" | NormalizeAccounts
$permissionDeny = Get-AnsibleParam -obj $params -name "deny" -type "str" -default "" | NormalizeAccounts $permissionDeny = Get-AnsibleParam -obj $params -name "deny" -type "str" -default "" | NormalizeAccounts
$cachingMode = Get-AnsibleParam -obj $params -name "caching_mode" -type "str" -default "None" -validateSet "BranchCache","Documents","Manual","None","Programs", "Unkown" $cachingMode = Get-AnsibleParam -obj $params -name "caching_mode" -type "str" -default "Manual" -validateSet "BranchCache","Documents","Manual","None","Programs","Unknown"
If (-Not (Test-Path -Path $path)) { If (-Not (Test-Path -Path $path)) {
Fail-Json $result "$path directory does not exist on the host" Fail-Json $result "$path directory does not exist on the host"
@ -252,7 +252,7 @@ Try {
} }
} }
Catch { Catch {
Fail-Json $result "an error occurred when attempting to create share $name" Fail-Json $result "an error occurred when attempting to create share $($name): $($_.Exception.Message)"
} }
Exit-Json $result Exit-Json $result

View file

@ -39,15 +39,14 @@ options:
name: name:
description: description:
- Share name - Share name
required: yes required: True
path: path:
description: description:
- Share directory - Share directory
required: yes required: True
state: state:
description: description:
- Specify whether to add C(present) or remove C(absent) the specified share - Specify whether to add C(present) or remove C(absent) the specified share
required: no
choices: choices:
- present - present
- absent - absent
@ -55,36 +54,24 @@ options:
description: description:
description: description:
- Share description - Share description
required: no
default: none
list: list:
description: description:
- Specify whether to allow or deny file listing, in case user got no permission on share - Specify whether to allow or deny file listing, in case user got no permission on share
required: no
choices: choices:
- yes - yes
- no - no
default: none
read: read:
description: description:
- Specify user list that should get read access on share, separated by comma. - Specify user list that should get read access on share, separated by comma.
required: no
default: none
change: change:
description: description:
- Specify user list that should get read and write access on share, separated by comma. - Specify user list that should get read and write access on share, separated by comma.
required: no
default: none
full: full:
description: description:
- Specify user list that should get full access on share, separated by comma. - Specify user list that should get full access on share, separated by comma.
required: no
default: none
deny: deny:
description: description:
- Specify user list that should get no access, regardless of implied access on share, separated by comma. - Specify user list that should get no access, regardless of implied access on share, separated by comma.
required: no
default: none
caching_mode: caching_mode:
description: description:
- Set the CachingMode for this share. - Set the CachingMode for this share.
@ -95,8 +82,8 @@ options:
- None - None
- Programs - Programs
- Unknown - Unknown
required: no default: "Manual"
default: "None" version_added: "2.3"
author: Hans-Joachim Kliemeck (@h0nIg), David Baumann (@daBONDi) author: Hans-Joachim Kliemeck (@h0nIg), David Baumann (@daBONDi)
''' '''