The below requirements are needed on the host that executes this module.
Parameter | Choices/Defaults | Comments |
---|---|---|
caching_mode (added in 2.3) |
| Set the CachingMode for this share. |
change | Specify user list that should get read and write access on share, separated by comma. | |
deny | Specify user list that should get no access, regardless of implied access on share, separated by comma. | |
description | Share description. | |
encrypt bool (added in 2.4) |
| Sets whether to encrypt the traffic to the share or not. |
full | Specify user list that should get full access on share, separated by comma. | |
list bool |
| Specify whether to allow or deny file listing, in case user has no permission on share. Also known as Access-Based Enumeration. |
name required | Share name. | |
path path required | Share directory. | |
read | Specify user list that should get read access on share, separated by comma. | |
state |
| Specify whether to add present or remove absent the specified share. |
# Playbook example # Add share and set permissions --- - name: Add secret share 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 win_share: name: company description: top secret share path: C:\shares\company list: yes full: Administrators,CEO read: Global - name: Remove previously added share 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 | success | A list of action cmdlets that were run by the module. Sample: ['New-SmbShare -Name share -Path C:\\temp'] |
This module is flagged as preview which means that it is not guaranteed to have a backwards compatible interface.
This module is flagged as core which means that it is maintained by the Ansible Core Team. See Module Maintenance & Support for more info.
For a list of other modules that are also maintained by the Ansible Core Team, see here.
For more information about Red Hat’s support of this module, please refer to this Knowledge Base article
Hint
If you notice any issues in this documentation you can edit this document to improve it.
© 2012–2018 Michael DeHaan
© 2018 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.7/modules/win_share_module.html