Note
This plugin is part of the ansible.windows collection.
To install it use: ansible-galaxy collection install ansible.windows
.
To use it in a playbook, specify: ansible.windows.win_share
.
The below requirements are needed on the host that executes this module.
Parameter | Choices/Defaults | Comments |
---|---|---|
caching_mode string |
| Set the CachingMode for this share. |
change string | Specify user list that should get read and write access on share, separated by comma. | |
deny string | Specify user list that should get no access, regardless of implied access on share, separated by comma. | |
description string | Share description. | |
encrypt boolean |
| Sets whether to encrypt the traffic to the share or not. |
full string | Specify user list that should get full access on share, separated by comma. | |
list boolean |
| Specify whether to allow or deny file listing, in case user has no permission on share. Also known as Access-Based Enumeration. |
name string / required | Share name. | |
path path / required | Share directory. | |
read string | Specify user list that should get read access on share, separated by comma. | |
rule_action string |
| Whether to add or set (replace) access control entries. |
state string |
| Specify whether to add present or remove absent the specified share. |
- name: Add secret share ansible.windows.win_share: name: internal description: top secret share path: C:\shares\internal list: no full: Administrators,CEO read: HR-Global deny: HR-External - name: Add public company share ansible.windows.win_share: name: company description: top secret share path: C:\shares\company list: yes full: Administrators,CEO read: Global - name: Remove previously added share ansible.windows.win_share: name: internal state: absent
Common return values are documented here, the following are the fields unique to this module:
Key | Returned | Description |
---|---|---|
actions list / elements=string | success | A list of action cmdlets that were run by the module. Sample: ['New-SmbShare -Name share -Path C:\\temp'] |
© 2012–2018 Michael DeHaan
© 2018–2019 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.10/collections/ansible/windows/win_share_module.html