arensb.truenas.sharing_smb module – Manage SMB sharing
Note
This module is part of the arensb.truenas collection (version 1.11.4).
To install it, use: ansible-galaxy collection install arensb.truenas
.
To use it in a playbook, specify: arensb.truenas.sharing_smb
.
New in arensb.truenas 1.4.3
Synopsis
Create, manage, and delete SMB shares.
Parameters
Parameter |
Comments |
---|---|
Enable Access Based Share Enumeration. Choices:
|
|
When set, enables ACL support for the share. Choices:
|
|
Use Apple-style character encoding. By default, Samba uses a hashing algorithm for filename characters that are illegal in NTFS. This option causes it to translate such characters to the Unicode private range. Choices:
|
|
Additional smb4.conf options. |
|
If true, share is visible when browsing shares. Choices:
|
|
Description of the share, for the system maintainer. |
|
Enables using file handles that can withstand short disconnections. Enables support for POSIX byte-range locks. Choices:
|
|
If true, the share is enabled. Otherwise, it is present but disabled. Choices:
|
|
Enable File Server Remote VSS Protocol (FSRVP). This allows RPC clients to manage snapshots for the share. Choices:
|
|
Enables guest access (no login). |
|
If true, this share may be used for home directories. Only one such share is allowed. |
|
List of hostnames/IP addresses of hosts that are allowed access to the share. If |
|
List of hostnames/IP addresses of hosts that are denied access to the share. If |
|
Name of the share, as seen by the SMB client. |
|
Directory to share, on the server. |
|
Suffix appended to the share connection path. This may contain macros, as defined in smb.conf(5). |
|
Note that the |
|
Choices:
|
|
If true, share is read-only. Choices:
|
|
When set, export ZFS snapshots as VSS shadow copies. Choices:
|
|
Whether the share should exist or not. Choices:
|
|
Allow multiple NTFS data streams. |
|
Enables support for Apple Time Machine backups. Choices:
|
Examples
- name: Simple default share
sharing_smb:
name: export1
path: /mnt/path1
- name: Share with host lists
sharing_smb:
name: export2
path: /mnt/path2
comment: "Shared to just a few hosts."
purpose: NO_PRESET
hostsallow:
- host1.dom.ain
- host2.dom.ain
- 10.2.3.0/24
hostsdeny:
- ALL
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
A data structure describing a newly-created share. Returned: success |
|
When this module exits abnormally, Returned: success |