dellemc / dellemc.powerscale / 3.0.0 / module / smb_file Manage SMB files on a PowerScale Storage System | "added in version" 1.9.0 of dellemc.powerscale" Authors: Pavan Mudunuri(@Pavan-Mudunuri) <ansible.team@dell.com>dellemc.powerscale.smb_file (3.0.0) — module
Install with ansible-galaxy collection install dellemc.powerscale:==3.0.0
collections: - name: dellemc.powerscale version: 3.0.0
Managing SMB files on a PowerScale Storage System includes getting details of all SMB open files and closing SMB files.
- name: Get list of SMB files of the PowerScale cluster dellemc.powerscale.smb_file: onefs_host: "{{onefs_host}}" verify_ssl: "{{verify_ssl}}" api_user: "{{api_user}}" api_password: "{{api_password}}" state: "present"
- name: Close SMB file of the PowerScale cluster dellemc.powerscale.smb_file: onefs_host: "{{onefs_host}}" verify_ssl: "{{verify_ssl}}" api_user: "{{api_user}}" api_password: "{{api_password}}" file_id: xxx state: "absent"
- name: Close smb file of the PowerScale cluster dellemc.powerscale.smb_file: onefs_host: "{{onefs_host}}" verify_ssl: "{{verify_ssl}}" api_user: "{{api_user}}" api_password: "{{api_password}}" file_path: "/ifs/ATest" state: "absent"
state: choices: - absent - present default: present description: - Defines the state of SMB file. - C(present) indicates that the SMB file should exist in system. - C(absent) indicates that the SMB file is closed in system. type: str file_id: description: - Unique id of SMB open file. Mutually exclusive with I(file_path). type: int 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 file_path: description: - Path of SMB file. Mutually exclusive with I(file_id). - If file path is provided all the open file sessions in the path will be closed. type: str onefs_host: description: - IP address or FQDN of the PowerScale cluster. required: true type: str verify_ssl: choices: - true - false description: - boolean variable to specify whether to validate SSL certificate or not. - C(true) - indicates that the SSL certificate should be verified. - C(false) - indicates that the SSL certificate should not be verified. required: true type: bool api_password: description: - the password of the PowerScale cluster. required: true type: str
changed: description: A boolean indicating if the task had to make changes. returned: always sample: 'false' type: bool smb_file_details: contains: file: description: Path of file within /ifs. sample: C:\\ifs type: str id: description: The ID of the SMB open file. sample: 950 type: int locks: description: The number of locks user holds on file. sample: 3 type: int permissions: description: The user's permissions on file. sample: - read type: list user: description: User holding file open sample: admin type: str description: The SMB file details. returned: always sample: smb_file_details: - file: C:\ifs id: 1370 locks: 0 permissions: - read user: admin type: dict