Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

win_share: tweaks after the caching mode changes #22763

Merged
merged 2 commits into from Mar 23, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/ansible/modules/windows/win_share.ps1
Expand Up @@ -138,7 +138,7 @@ 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-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)) {
Fail-Json $result "$path directory does not exist on the host"
Expand Down Expand Up @@ -252,7 +252,7 @@ Try {
}
}
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
21 changes: 4 additions & 17 deletions lib/ansible/modules/windows/win_share.py
Expand Up @@ -39,52 +39,39 @@
name:
description:
- Share name
required: yes
required: True
path:
description:
- Share directory
required: yes
required: True
state:
description:
- Specify whether to add C(present) or remove C(absent) the specified share
required: no
choices:
- present
- absent
default: present
description:
description:
- Share description
required: no
default: none
list:
description:
- Specify whether to allow or deny file listing, in case user got no permission on share
required: no
choices:
- yes
- no
default: none
read:
description:
- Specify user list that should get read access on share, separated by comma.
required: no
default: none
change:
description:
- Specify user list that should get read and write access on share, separated by comma.
required: no
default: none
full:
description:
- Specify user list that should get full access on share, separated by comma.
required: no
default: none
deny:
description:
- Specify user list that should get no access, regardless of implied access on share, separated by comma.
required: no
default: none
caching_mode:
description:
- Set the CachingMode for this share.
Expand All @@ -95,8 +82,8 @@
- None
- Programs
- Unknown
required: no
default: "None"
default: "Manual"
version_added: "2.3"
author: Hans-Joachim Kliemeck (@h0nIg), David Baumann (@daBONDi)
'''

Expand Down