dellemc / dellemc.unity / 2.0.0 / module / smbshare Manage SMB shares on Unity storage system | "added in version" 1.1.0 of dellemc.unity" Authors: P Srinivas Rao (@srinivas-rao5) <ansible.team@dell.com>dellemc.unity.smbshare (2.0.0) — module
Install with ansible-galaxy collection install dellemc.unity:==2.0.0
collections: - name: dellemc.unity version: 2.0.0
Managing SMB Shares on Unity storage system includes create, get, modify, and delete the smb shares.
- name: Create SMB share for a filesystem dellemc.unity.smbshare: unispherehost: "{{unispherehost}}" username: "{{username}}" password: "{{password}}" validate_certs: "{{validate_certs}}" share_name: "sample_smb_share" filesystem_name: "sample_fs" nas_server_id: "NAS_11" path: "/sample_fs" description: "Sample SMB share created" is_abe_enabled: true is_branch_cache_enabled: true offline_availability: "DOCUMENTS" is_continuous_availability_enabled: true is_encryption_enabled: true umask: "777" state: "present"
- name: Modify Attributes of SMB share for a filesystem dellemc.unity.smbshare: unispherehost: "{{unispherehost}}" username: "{{username}}" password: "{{password}}" validate_certs: "{{validate_certs}}" share_name: "sample_smb_share" nas_server_name: "sample_nas_server" description: "Sample SMB share attributes updated" is_abe_enabled: false is_branch_cache_enabled: false offline_availability: "MANUAL" is_continuous_availability_enabled: "false" is_encryption_enabled: "false" umask: "022" state: "present"
- name: Create SMB share for a snapshot dellemc.unity.smbshare: unispherehost: "{{unispherehost}}" username: "{{username}}" password: "{{password}}" validate_certs: "{{validate_certs}}" share_name: "sample_snap_smb_share" snapshot_name: "sample_snapshot" nas_server_id: "NAS_11" path: "/sample_snapshot" description: "Sample SMB share created for snapshot" is_abe_enabled: true is_branch_cache_enabled: true is_continuous_availability_enabled: true is_encryption_enabled: true umask: "777" state: "present"
- name: Modify Attributes of SMB share for a snapshot dellemc.unity.smbshare: unispherehost: "{{unispherehost}}" username: "{{username}}" password: "{{password}}" validate_certs: "{{validate_certs}}" share_name: "sample_snap_smb_share" snapshot_name: "sample_snapshot" description: "Sample SMB share attributes updated for snapshot" is_abe_enabled: false is_branch_cache_enabled: false offline_availability: "MANUAL" is_continuous_availability_enabled: "false" is_encryption_enabled: "false" umask: "022" state: "present"
- name: Get details of SMB share dellemc.unity.smbshare: unispherehost: "{{unispherehost}}" username: "{{username}}" password: "{{password}}" validate_certs: "{{validate_certs}}" share_id: "{{smb_share_id}}" state: "present"
- name: Delete SMB share dellemc.unity.smbshare: unispherehost: "{{unispherehost}}" username: "{{username}}" password: "{{password}}" validate_certs: "{{validate_certs}}" share_id: "{{smb_share_id}}" state: "absent"
path: description: - Local path to the file system/Snapshot or any existing sub-folder of the file system/Snapshot that is shared over the network. - Path is relative to the root of the filesystem. - Required for creation of the SMB share. type: str port: default: 443 description: - Port number through which communication happens with Unity management server. type: int state: choices: - absent - present description: - Define whether the SMB share should exist or not. - Value C(present) indicates that the share should exist on the system. - Value C(absent) indicates that the share should not exist on the system. required: true type: str umask: description: - The default UNIX umask for new files created on the SMB Share. type: str password: description: - The password of the Unity management server. required: true type: str share_id: description: - ID of the SMB share. - Should not be specified during creation. Id is auto generated. - For all other operations either I(share_name) or I(share_id) is required. - If I(share_id) is used then no need to pass nas_server/filesystem/snapshot/path. type: str username: description: - The username of the Unity management server. required: true type: str share_name: description: - Name of the SMB share. - Required during creation of the SMB share. - For all other operations either I(share_name) or I(share_id) is required. type: str description: description: - Description for the SMB share. - Optional parameter when creating a share. - To modify, pass the new value in description field. type: str snapshot_id: description: - The ID of the Filesystem Snapshot. - Either I(snapshot_name) or I(snapshot_id) is required for creation of the SMB share for a snapshot. - If I(snapshot_name) is specified, then I(nas_server_name)/I(nas_server_id) is required to uniquely identify the snapshot. - Options I(snapshot_name) and I(snapshot_id) are mutually exclusive parameters. type: str filesystem_id: description: - The ID of the File System. - Either I(filesystem_name) or I(filesystem_id) is required for creation of the SMB share for filesystem. - If I(filesystem_name) is specified, then I(nas_server_name)/I(nas_server_id) is required to uniquely identify the filesystem. - Options I(filesystem_name) and I(filesystem_id) are mutually exclusive parameters. type: str nas_server_id: description: - The ID of the NAS Server. - It is not required if I(share_id) is used. type: str snapshot_name: description: - The Name of the Filesystem Snapshot. - Either I(snapshot_name) or I(snapshot_id) is required for creation of the SMB share for a snapshot. - If I(snapshot_name) is specified, then I(nas_server_name)/I(nas_server_id) is required to uniquely identify the snapshot. - Options I(snapshot_name) and I(snapshot_id) are mutually exclusive parameters. type: str unispherehost: description: - IP or FQDN of the Unity management server. required: true type: str is_abe_enabled: description: - Indicates whether Access-based Enumeration (ABE) for SMB share is enabled. - During creation, if not mentioned then default is C(false). type: bool validate_certs: aliases: - verifycert default: true description: - Boolean variable to specify whether or not to validate SSL certificate. - C(true) - Indicates that the SSL certificate should be verified. - C(false) - Indicates that the SSL certificate should not be verified. type: bool filesystem_name: description: - The Name of the File System. - Either I(filesystem_name) or I(filesystem_id) is required for creation of the SMB share for filesystem. - If I(filesystem_name) is specified, then I(nas_server_name)/I(nas_server_id) is required to uniquely identify the filesystem. - Options I(filesystem_name) and I(filesytem_id) are mutually exclusive parameters. type: str nas_server_name: description: - The Name of the NAS Server. - It is not required if I(share_id) is used. - Options I(nas_server_name) and I(nas_server_id) are mutually exclusive parameters. type: str offline_availability: choices: - MANUAL - DOCUMENTS - PROGRAMS - NONE description: - Defines valid states of Offline Availability. - C(MANUAL)- Only specified files will be available offline. - C(DOCUMENTS)- All files that users open will be available offline. - C(PROGRAMS)- Program will preferably run from the offline cache even when connected to the network. All files that users open will be available offline. - C(NONE)- Prevents clients from storing documents and programs in offline cache. type: str is_encryption_enabled: description: - Indicates whether encryption for SMB 3.0 is enabled at the shared folder level. - During creation, if not mentioned then default is C(false). type: bool is_branch_cache_enabled: description: - Indicates whether Branch Cache optimization for SMB share is enabled. - During creation, if not mentioned then default is C(false). type: bool is_continuous_availability_enabled: description: - Indicates whether continuous availability for SMB 3.0 is enabled. - During creation, if not mentioned then default is C(false). type: bool
changed: description: Whether or not the resource has changed. returned: always sample: true type: bool smb_share_details: contains: description: description: Additional information about the share. sample: This share is created for demo purpose only. type: str filesystem_id: description: The ID of the Filesystem. type: str filesystem_name: description: The Name of the filesystem type: str id: description: The ID of the SMB share. type: str is_abe_enabled: description: Whether Access Based enumeration is enforced or not. sample: false type: bool is_branch_cache_enabled: description: Whether branch cache is enabled or not. sample: false type: bool is_continuous_availability_enabled: description: Whether the share will be available continuously or not. sample: false type: bool is_encryption_enabled: description: Whether encryption is enabled or not. sample: false type: bool name: description: Name of the SMB share. sample: sample_smb_share type: str nas_server_id: description: The ID of the nas_server. type: str nas_server_name: description: The Name of the nas_server. type: str snapshot_id: description: The ID of the Snapshot. type: str snapshot_name: description: The Name of the Snapshot. type: str umask: description: Unix mask for the SMB share. type: str description: The SMB share details. returned: When share exists. sample: creation_time: '2022-03-17 11:56:54.867000+00:00' description: '' existed: true export_paths: - \\multi-prot-pie.extreme1.com\multi-prot-hui - \\10.230.24.26\multi-prot-hui filesystem: UnityFileSystem: hash: 8748426746492 filesystem_id: fs_140 filesystem_name: multi-prot-hui hash: 8748426746588 id: SMBShare_20 is_abe_enabled: false is_ace_enabled: false is_branch_cache_enabled: false is_continuous_availability_enabled: false is_dfs_enabled: false is_encryption_enabled: false is_read_only: null modified_time: '2022-03-17 11:56:54.867000+00:00' name: multi-prot-hui nas_server_id: nas_5 nas_server_name: multi-prot offline_availability: CifsShareOfflineAvailabilityEnum.NONE path: / snap: null type: CIFSTypeEnum.CIFS_SHARE umask: '022' type: dict