mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-08-05 13:44:24 -07:00
fixxed problems related to path input
This commit is contained in:
parent
0d01a36dd9
commit
5f9eaf193e
2 changed files with 5 additions and 2 deletions
|
@ -144,6 +144,9 @@ Try {
|
||||||
Fail-Json $result "$path directory does not exist on the host"
|
Fail-Json $result "$path directory does not exist on the host"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# normalize path and remove slash at the end
|
||||||
|
$path = (Get-Item $path).FullName -replace ".$"
|
||||||
|
|
||||||
# need to (re-)create share
|
# need to (re-)create share
|
||||||
If (!$share) {
|
If (!$share) {
|
||||||
New-SmbShare -Name $name -Path $path
|
New-SmbShare -Name $name -Path $path
|
||||||
|
|
|
@ -91,7 +91,7 @@ EXAMPLES = '''
|
||||||
win_share:
|
win_share:
|
||||||
name: internal
|
name: internal
|
||||||
description: top secret share
|
description: top secret share
|
||||||
path: C:\\shares\\internal\\
|
path: C:/shares/internal
|
||||||
list: 'no'
|
list: 'no'
|
||||||
full: Administrators,CEO
|
full: Administrators,CEO
|
||||||
read: HR-Global
|
read: HR-Global
|
||||||
|
@ -101,7 +101,7 @@ EXAMPLES = '''
|
||||||
win_share:
|
win_share:
|
||||||
name: company
|
name: company
|
||||||
description: top secret share
|
description: top secret share
|
||||||
path: C:\\shares\\company\\
|
path: C:/shares/company
|
||||||
list: 'yes'
|
list: 'yes'
|
||||||
full: Administrators,CEO
|
full: Administrators,CEO
|
||||||
read: Global
|
read: Global
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue