dellemc / dellemc.powerscale / 1.4.0 / module / dellemc_powerscale_smb Manage SMB shares on Dell EMC PowerScale. You can perform the following operations | "added in version" 1.2.0 of dellemc.powerscale" Authors: Arindam Datta (@dattaarindam) <ansible.team@dell.com> preview | supported by communitydellemc.powerscale.dellemc_powerscale_smb (1.4.0) — module
Install with ansible-galaxy collection install dellemc.powerscale:==1.4.0
collections: - name: dellemc.powerscale version: 1.4.0
Managing SMB share on PowerScale.
Create a new SMB share.
Modify an existing SMB share.
Get details of an existing SMB share.
Delete an existing SMB share.
- name: Create SMB share for non system access zone dellemc_powerscale_smb: onefs_host: "{{onefs_host}}" verify_ssl: "{{verify_ssl}}" api_user: "{{api_user}}" api_password: "{{api_password}}" share_name: "{{name}}" path: "<path>" access_zone: "{{non_system_access_zone}}" state: "{{state_present}}"
- name: Create SMB share for system access zone dellemc_powerscale_smb: onefs_host: "{{onefs_host}}" verify_ssl: "{{verify_ssl}}" api_user: "{{api_user}}" api_password: "{{api_password}}" share_name: "{{name}}" path: "<system_az_path>" description: "{{description}}" permissions: - user_name: "{{system_az_user}}" permission: "full" permission_type: "allow" - group_name: "{{system_az_group}}" permission: "read" permission_type: "allow" - wellknown: "everyone" permission: "read" permission_type: "allow" state: "{{state_present}}"
- name: Modify user permission for SMB share dellemc_powerscale_smb: onefs_host: "{{onefs_host}}" verify_ssl: "{{verify_ssl}}" api_user: "{{api_user}}" api_password: "{{api_password}}" share_name: "{{name}}" path: "<system_az_path>" description: "{{description}}" permissions: - user_name: "{{system_az_user}}" permission: "full" permission_type: "allow" - group_name: "{{system_az_group}}" permission: "write" permission_type: "allow" - wellknown: "everyone" permission: "write" permission_type: "deny" state: "{{state_present}}"
- name: Delete system access zone SMB share dellemc_powerscale_smb: onefs_host: "{{onefs_host}}" verify_ssl: "{{verify_ssl}}" api_user: "{{api_user}}" api_password: "{{api_password}}" share_name: "{{name}}" state: "{{state_absent}}"
- name: Get SMB share details dellemc_powerscale_smb: onefs_host: "{{onefs_host}}" verify_ssl: "{{verify_ssl}}" api_user: "{{api_user}}" api_password: "{{api_password}}" share_name: "{{name}}" state: "{{state_present}}"
- name: Create SMB share for non system access zone dellemc_powerscale_smb: onefs_host: "{{onefs_host}}" verify_ssl: "{{verify_ssl}}" api_user: "{{api_user}}" api_password: "{{api_password}}" share_name: "{{name}}" path: "<non_system_az_path>" access_zone: "{{non_system_access_zone}}" description: "{{description}}" permissions: - user_name: "{{non_system_az_user}}" permission: "full" permission_type: "allow" - group_name: "{{non_system_az_group}}" permission: "read" permission_type: "allow" - wellknown: "everyone" permission: "read" permission_type: "allow" state: "{{state_present}}"
- name: Modify description for an non system access zone SMB share dellemc_powerscale_smb: onefs_host: "{{onefs_host}}" verify_ssl: "{{verify_ssl}}" api_user: "{{api_user}}" api_password: "{{api_password}}" share_name: "{{name}}" access_zone: "{{non_system_access_zone}}" description: "new description" state: "{{state_present}}"
- name: Modify name for an existing non system access zone SMB share dellemc_powerscale_smb: onefs_host: "{{onefs_host}}" verify_ssl: "{{verify_ssl}}" api_user: "{{api_user}}" api_password: "{{api_password}}" share_name: "{{name}}" new_share_name: "{{new_name}}" access_zone: "{{non_system_access_zone}}" description: "new description" state: "{{state_present}}"
path: description: - The path of the SMB share. This parameter will be mandatory only for the create operation. This is the absolute path for System Access Zone and the relative path for non-System Access Zone. type: str state: choices: - absent - present description: - Defines whether the SMB share should exist or not. required: true type: str port_no: default: '8080' description: - Port number of the PowerScale cluster.It defaults to 8080 if not specified. required: false type: str api_user: description: - username of the PowerScale cluster. required: true type: str browsable: description: - Share is visible in net view and the browse list. type: bool onefs_host: description: - IP address or FQDN of the PowerScale cluster. required: true type: str share_name: description: - The name of the SMB share. required: true type: str verify_ssl: choices: - true - false description: - boolean variable to specify whether to validate SSL certificate or not. - True - indicates that the SSL certificate should be verified. - False - indicates that the SSL certificate should not be verified. required: true type: bool access_zone: default: System description: - Access zone which contains this share. If not specified it will be considered as a System Access Zone. - For a non-System Access Zone the effective path where the SMB is created will be determined by the base path of the Access Zone and the path provided by the user in the playbook. - For a System Access Zone the effective path will be the absolute path provided by the user in the playbook. type: str description: description: - Description about the SMB share. type: str permissions: description: - Specifies permission for specific user, group, or trustee. Valid options read, write, and full. - This is a list of dictionaries. Each dictionry entry has 3 mandatory values- - a)'user_name'/'group_name'/'wellknown' can have actual name of the trustee like 'user'/'group'/'wellknown' - b)'permission' can be 'read'/''write'/'full' - c)'permission_type' can be 'allow'/'deny' - The fourth entry 'provider_type' is optional (default is 'local') - d)'provider_type' can be 'local'/'file'/'ads'/'ldap' elements: dict type: list api_password: description: - the password of the PowerScale cluster. required: true type: str new_share_name: description: - The new name of the SMB share. type: str file_create_mask: description: - File creates mask bits. Octal value for owner, group, and others vs read, write, and execute type: str file_create_mode: description: - File creates mode bits. Octal value for owner, group, and others vs read, write, and execute type: str ntfs_acl_support: description: - Support NTFS ACLs on files and directories. type: bool directory_create_mask: description: - Directory creates mask bits. Octal value for owner, group, and others vs read, write, and execute type: str directory_create_mode: description: - Directory creates mode bits. Octal value for owner, group, and others vs read, write, and execute type: str access_based_enumeration: description: - Only enumerates files and folders for the requesting user has access to. type: bool access_based_enumeration_root_only: description: - Access-based enumeration on only the root directory of the share. type: bool
changed: description: A boolean indicating if the task had to make changes. returned: always type: bool smb_details: contains: browsable: description: Share is visible in net view and the browse list type: bool description: description: Description of the SMB Share type: str directory_create_mask: description: Directory create mask bit for SMB Share type: int directory_create_mask(octal): description: Directory create mask bit for SMB Share in octal format type: str directory_create_mode: description: Directory create mode bit for SMB Share type: int directory_create_mode(octal): description: Directory create mode bit for SMB Share in octal format type: str file_create_mask: description: File create mask bit for SMB Share type: int file_create_mask(octal): description: File create mask bit for SMB Share in octal format type: str file_create_mode: description: File create mode bit for SMB Share type: int file_create_mode(octal): description: File create mode bit for SMB Share in octal format type: str id: description: Id of the SMB Share type: str name: description: Name of the SMB Share type: str path: description: Path of the SMB Share type: str permission: description: permission on the of the SMB Share for user/group/wellknown type: list description: Details of the SMB Share. returned: always type: complex