dellemc / dellemc.powerstore / 1.3.0 / module / dellemc_powerstore_smbshare Manage SMB shares on a PowerStore storage system. | "added in version" 1.1.0 of dellemc.powerstore" Authors: P Srinivas Rao (@srinivas-rao5) <ansible.team@dell.com> preview | supported by communitydellemc.powerstore.dellemc_powerstore_smbshare (1.3.0) — module
Install with ansible-galaxy collection install dellemc.powerstore:==1.3.0
collections: - name: dellemc.powerstore version: 1.3.0
Managing SMB Shares on PowerStore storage system includes create, get, modify, and delete the SMB shares.
- name: Create SMB share for a filesystem dellemc_powerstore_smbshare: array_ip: "{{array_ip}}" verifycert: "{{verifycert}}" user: "{{user}}" password: "{{password}}" share_name: "sample_smb_share" filesystem: "sample_fs" nas_server: "{{nas_server_id}}" path: "{{path}}" 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 state: "present"
- name: Modify Attributes of SMB share for a filesystem dellemc_powerstore_smbshare: array_ip: "{{array_ip}}" verifycert: "{{verifycert}}" user: "{{user}}" password: "{{password}}" share_name: "sample_smb_share" nas_server: "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_powerstore_smbshare: array_ip: "{{array_ip}}" verifycert: "{{verifycert}}" user: "{{user}}" password: "{{password}}" share_name: "sample_snap_smb_share" snapshot: "sample_snapshot" nas_server: "{{nas_server_id}}" path: "{{path}}" description: "Sample SMB share created for snapshot" is_abe_enabled: True is_branch_cache_enabled: True is_continuous_availability_enabled: True state: "present"
- name: Modify Attributes of SMB share for a snapshot dellemc_powerstore_smbshare: array_ip: "{{array_ip}}" verifycert: "{{verifycert}}" user: "{{user}}" password: "{{password}}" share_name: "sample_snap_smb_share" nas_server: "sample_nas_server" 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 umask: "022" state: "present"
- name: Get details of SMB share dellemc_powerstore_smbshare: array_ip: "{{array_ip}}" verifycert: "{{verifycert}}" user: "{{user}}" password: "{{password}}" share_id: "{{smb_share_id}}" state: "present"
- name: Delete SMB share dellemc_powerstore_smbshare: array_ip: "{{array_ip}}" verifycert: "{{verifycert}}" user: "{{user}}" password: "{{password}}" 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 base of the NAS server and must start with the name of the filesystem. - Required for creation of the SMB share. type: str user: description: - The username of the PowerStore host. required: true type: str state: choices: - absent - present description: - Define whether the SMB share should exist or not. - present indicates that the share should exist on the system. - 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. - During creation, if not mentioned, then the default is "022". - For all other operations, the default is None. type: str array_ip: description: - IP or FQDN of the PowerStore management system. required: true type: str password: description: - The password of the PowerStore host. 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 share_name or share_id is required. - If share_id is used then no need to pass nas_server/filesystem/snapshot/ path. type: str snapshot: description: - The ID/Name of the Snapshot. - Either filesystem or snapshot is required for creation of the SMB share. - If snapshot name is specified, then nas_server is required to uniquely identify the snapshot. - If snapshot parameter is provided, then filesystem cannot be specified. - SMB share can be created only if access type of snapshot is "protocol". type: str filesystem: description: - The ID/Name of the File System. - Either filesystem or snapshot is required for creation of the SMB share. - If filesystem name is specified, then nas_server is required to uniquely identify the filesystem. - If filesystem parameter is provided, then snapshot cannot be specified. type: str nas_server: description: - The ID/Name of the NAS Server. - It is not required if share_id is used. type: str share_name: description: - Name of the SMB share. - Required during creation of the SMB share. - For all other operations either share_name or share_id is required. type: str verifycert: choices: - true - false description: - Boolean variable to specify whether to validate SSL certificate or not. - True - indicates that the SSL certificate should be verified. Set the environment variable REQUESTS_CA_BUNDLE to the path of the SSL certificate. - False - indicates that the SSL certificate should not be verified. required: true type: bool description: description: - Description for the SMB share. - Optional parameter when creating a share. - To modify, pass the new value in description field. type: str is_abe_enabled: description: - Indicates whether Access-based Enumeration (ABE) for SMB share is enabled. - During creation, if not mentioned, then the default is False. type: bool offline_availability: choices: - MANUAL - DOCUMENTS - PROGRAMS - NONE description: - Defines valid states of Offline Availability. - MANUAL- Only specified files will be available offline. - DOCUMENTS- All files that users open will be available offline. - PROGRAMS- Program will preferably run from the offline cache even when connected to the network. All files that users open will be available offline. - 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 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 False. type: bool is_continuous_availability_enabled: description: - Indicates whether continuous availability for SMB 3.0 is enabled. - During creation, if not mentioned, then the default is 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 file_system: contains: filesystem_type: description: Type of filesystem. sample: Primary type: str id: description: ID of filesystem. sample: 5f73f516-e67b-b179-8901-72114981c1f3 type: str name: description: Name of filesystem. sample: sample_filesystem type: str nas_server: description: nas_server of filesystem. type: dict description: Includes ID and Name of filesystem and nas server for which smb share exists. type: complex id: description: The ID of the SMB share. sample: 5efc4432-cd57-5dd0-2018-42079d64ae37 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 description: The SMB share details. returned: When share exists. type: complex