dellemc / dellemc.powerstore / 3.2.0 / module / filesystem Filesystem operations for PowerStore Storage system | "added in version" 1.1.0 of dellemc.powerstore" Authors: Arindam Datta (@dattaarindam) <ansible.team@dell.com>, Trisha Datta (@trisha-dell) <ansible.team@dell.com>, Pavan Mudunuri(@Pavan-Mudunuri) <ansible.team@dell.com>dellemc.powerstore.filesystem (3.2.0) — module
Install with ansible-galaxy collection install dellemc.powerstore:==3.2.0
collections: - name: dellemc.powerstore version: 3.2.0
Supports the provisioning operations on a filesystem such as create, modify, delete and get the details of a filesystem.
Supports clone, refresh and restore operations on a filesystem.
- name: Create FileSystem by Name register: result_fs dellemc.powerstore.filesystem: array_ip: "{{array_ip}}" validate_certs: "{{validate_certs}}" user: "{{user}}" password: "{{password}}" filesystem_name: "{{filesystem_name}}" description: "{{description}}" nas_server: "{{nas_server_id}}" size: "5" cap_unit: "GB" access_policy: "UNIX" locking_policy: "MANDATORY" smb_properties: is_smb_no_notify_enabled: true is_smb_notify_on_access_enabled: true quota_defaults: grace_period: 1 grace_period_unit: 'days' default_hard_limit: 3 default_soft_limit: 2 protection_policy: "{{protection_policy_id}}" config_type: "VMWARE" is_async_mtime_enabled: true file_events_publishing_mode: "NFS_ONLY" host_io_size: "VMWARE_16K" state: "present"
- name: Modify File System by id dellemc.powerstore.filesystem: array_ip: "{{array_ip}}" validate_certs: "{{validate_certs}}" user: "{{user}}" password: "{{password}}" filesystem_id: "{{fs_id}}" folder_rename_policy: "ALL_ALLOWED" smb_properties: is_smb_op_locks_enabled: true smb_notify_on_change_dir_depth: 3 quota_defaults: grace_period: 2 grace_period_unit: 'weeks' default_hard_limit: 2 default_soft_limit: 1 is_async_mtime_enabled: true file_events_publishing_mode: "ALL" flr_attributes: mode: "Enterprise" minimum_retention: "5D" default_retention: "1M" maximum_retention: "1Y" state: "present"
- name: Get File System details by id dellemc.powerstore.filesystem: array_ip: "{{array_ip}}" validate_certs: "{{validate_certs}}" user: "{{user}}" password: "{{password}}" filesystem_id: "{{result_fs.filesystem_details.id}}" state: "present"
- name: Delete File System by id dellemc.powerstore.filesystem: array_ip: "{{array_ip}}" validate_certs: "{{validate_certs}}" user: "{{user}}" password: "{{password}}" filesystem_id: "{{result_fs.filesystem_details.id}}" state: "absent"
- name: Clone File System dellemc.powerstore.filesystem: array_ip: "{{ array_ip }}" validate_certs: "{{ validate_certs }}" user: "{{ user }}" password: "{{ password }}" filesystem_name: 'Atest' nas_server: 'Test_Nas' clone_filesystem: name: "Test_ansible" description: "Test" access_policy: "UNIX" locking_policy: "Advisory" folder_rename_policy: "All_Allowed" is_smb_sync_writes_enabled: true is_smb_no_notify_enabled: true is_smb_op_locks_enabled: true is_smb_notify_on_access_enabled: true is_smb_notify_on_write_enabled: true smb_notify_on_change_dir_depth: 32 is_async_MTime_enabled: false file_events_publishing_mode: "All" flr_attributes: force_clone: false state: "present"
- name: Refresh File System dellemc.powerstore.filesystem: array_ip: "{{ array_ip }}" validate_certs: "{{ validate_certs }}" user: "{{ user }}" password: "{{ password }}" snapshot_name: "Refresh_test" nas_server: 'Sample_NAS' refresh_filesystem: true state: "present"
- name: Restore File System dellemc.powerstore.filesystem: array_ip: "{{ array_ip }}" validate_certs: "{{ validate_certs }}" user: "{{ user }}" password: "{{ password }}" snapshot_id: "xxx-xxx-xxx" restore_filesystem: true backup_snap_name: "Restore_test" state: "present"
port: description: - Port number for the PowerStore array. - If not passed, it will take 443 as default. type: int size: description: - Size that the file system presents to the host or end user. - Mandatory only for create operation. type: int user: description: - The username of the PowerStore host. required: true type: str state: choices: - absent - present description: - Define whether the filesystem should exist or not. required: true type: str timeout: default: 120 description: - Time after which the connection will get terminated. - It is to be mentioned in seconds. type: int array_ip: description: - IP or FQDN of the PowerStore management system. required: true type: str cap_unit: choices: - GB - TB description: - Capacity unit for the size. - It defaults to C(GB), if not specified. type: str password: description: - The password of the PowerStore host. required: true type: str nas_server: description: - Name or ID of the NAS Server on which the file system is created. Mandatory parameter whenever I(filesystem_name) is provided, since filesystem names are unique only within a NAS server. type: str config_type: choices: - GENERAL - VMWARE description: - Indicates the file system type. - Cannot be modified. type: str description: description: - Description of the file system. type: str snapshot_id: description: - The ID of the Snapshot. - Specify either snapshot name or ID (but not both) for restore and refresh operations. type: str host_io_size: choices: - VMWARE_8K - VMWARE_16K - VMWARE_32K - VMWARE_64K description: - Typical size of writes from the server or other computer using the VMware file system to the storage system. - Can only be set when the I(config_type) is C(VMWARE). - Cannot be modified. type: str access_policy: choices: - NATIVE - UNIX - WINDOWS description: - File system security access policies. type: str filesystem_id: description: - Unique id of the file system. Mutually exclusive with I(filesystem_name). type: str snapshot_name: description: - The name of the filesystem snapshot. - Specify either snapshot name or ID (but not both) for restore and refresh operations. type: str flr_attributes: description: - The attributes for file retention. - Can only be provided when the I(config_type) is C(GENERAL). suboptions: auto_delete: description: - Indicates whether locked files will be automatically deleted from an FLR-enabled file system once their retention periods have expired. - This setting can only be applied to a mounted FLR enabled file systems. type: bool auto_lock: description: - Indicates whether to automatically lock files in an FLR-enabled file system. type: bool default_retention: description: - The default retention period that is used in an FLR-enabled file system when a file is locked and a retention period is not specified. type: str maximum_retention: description: - The longest retention period for which files on an FLR-enabled file system can be locked and protected from deletion. type: str minimum_retention: description: - The shortest retention period for which files on an FLR-enabled file system can be locked and protected from deletion. type: str mode: choices: - Enterprise - Compliance description: - The FLR type of the file system. - It can only be provided during creation of a filesystem. type: str policy_interval: description: - Indicates how long to wait (in seconds) after files are modified before the files are automatically locked. - This setting can only be applied to mounted FLR enabled file systems. type: int type: dict locking_policy: choices: - ADVISORY - MANDATORY description: - File system locking policies. - C(ADVISORY)- No lock checking for NFS and honor SMB lock range only for SMB. - C(MANDATORY)- Honor SMB and NFS lock range. type: str quota_defaults: description: - Contains the default attributes for a filesystem quota.It contains below optional candidate variables. suboptions: cap_unit: choices: - GB - TB description: - Capacity unit for default hard & soft limit. type: str default_hard_limit: description: - Default hard limit of user quotas and tree quotas. type: int default_soft_limit: description: - Default soft limit of user quotas and tree quotas. type: int grace_period: description: - Grace period of soft limit. type: int grace_period_unit: choices: - days - weeks - months description: - Unit of the grace period of soft limit. type: str type: dict smb_properties: description: - Advance settings for SMB. It contains optional candidate variables listed below. suboptions: is_smb_no_notify_enabled: description: - Indicates whether notifications of changes to directory file structure are enabled. type: bool is_smb_notify_on_access_enabled: description: - Indicates whether file access notifications are enabled on the file system. type: bool is_smb_notify_on_write_enabled: description: - Indicates whether file write notifications are enabled on the file system. type: bool is_smb_op_locks_enabled: description: - Indicates whether opportunistic file locking is enabled on the file system. type: bool is_smb_sync_writes_enabled: description: - Indicates whether the synchronous writes option is enabled on the file system. type: bool smb_notify_on_change_dir_depth: description: - Determines the lowest directory level to which the enabled notifications apply. minimum value is C(1). type: int type: dict validate_certs: aliases: - verifycert default: true description: - Boolean variable to specify whether to validate SSL certificate or not. - C(true) - indicates that the SSL certificate should be verified. Set the environment variable REQUESTS_CA_BUNDLE to the path of the SSL certificate. - C(false) - indicates that the SSL certificate should not be verified. type: bool filesystem_name: description: - Name of the file system. Mutually exclusive with I(filesystem_id). Mandatory only for create operation. type: str backup_snap_name: description: - Name of the backup snap to be created before the restore operation occurs. type: str clone_filesystem: description: - The attributes for filesystem clone. suboptions: access_policy: choices: - Native - UNIX - Windows description: - File system security access policies. - C(Native) - Native Security. - C(UNIX) - UNIX Security. - C(Windows) - Windows Security. type: str description: description: - Description of the clone. type: str file_events_publishing_mode: choices: - None - SMB_Only - NFS_Only - All description: - State of the event notification services for all file systems of the NAS server. - C(None) - File event notifications are disabled for this file system. - C(SMB_Only) - SMB notifications are enabled for this file system. - C(NFS_Only) - NFS notifications are enabled for this file system. - C(All) - SMB and NFS notifications are enabled for this file system. type: str flr_attributes: description: - The attributes for file retention. suboptions: force_clone: description: - Specifies whether an FLR-C file system should be cloned. - C(true) - means cloning an FLR-C file system is allowed. - C(false) - means cloning an FLR-C file system is not allowed. and any attempt to do so will return an error. type: bool type: dict folder_rename_policy: choices: - All_Allowed - SMB_Forbidden - All_Forbidden description: - File system folder rename policies for the file system with multi-protocol access enabled. - C(All_Allowed) - All protocols are allowed to rename directories without any restrictions. - C(SMB_Forbidden) - A directory rename from the SMB protocol will be denied if at least one file is opened in the directory or in one of its child directories. - C(All_Forbidden) - Any directory rename request will be denied regardless of the protocol used, if at least one file is opened in the directory or in one of its child directories. type: str is_async_MTime_enabled: description: - Indicates whether asynchronous MTIME is enabled on the file system. type: bool is_smb_no_notify_enabled: description: - Indicates whether notifications of changes to directory file structure are enabled. type: bool is_smb_notify_on_access_enabled: description: - Indicates whether file access notifications are enabled on the file system. type: bool is_smb_notify_on_write_enabled: description: - Indicates whether file write notifications are enabled on the file system. type: bool is_smb_op_locks_enabled: description: - Indicates whether opportunistic file locking is enabled on the file system. type: bool is_smb_sync_writes_enabled: description: - Indicates whether the synchronous writes option is enabled on the file system. type: bool locking_policy: choices: - Advisory - Mandatory description: - File system locking policies. - C(Advisory)- No lock checking for NFS and honor SMB lock range only for SMB. - C(Mandatory)- Honor SMB and NFS lock range. type: str name: description: - Name of the clone. - It can only be provided during creation of a filesystem clone. type: str smb_notify_on_change_dir_depth: description: - Determines the lowest directory level to which the enabled notifications apply. minimum value is C(1). type: int type: dict protection_policy: description: - Name or ID of the protection policy applied to the file system. - Specifying "" (empty string) removes the existing protection policy from file system. type: str refresh_filesystem: description: - Specifies to refresh filesystem. - Mandatory only for refresh filesystem. type: bool restore_filesystem: description: - Specifies to restore filesystem. - Mandatory only for restore filesystem. type: bool folder_rename_policy: choices: - ALL_ALLOWED - SMB_FORBIDDEN - ALL_FORBIDDEN description: - File system folder rename policies for the file system with multi-protocol access enabled. - C(ALL_ALLOWED) - All protocols are allowed to rename directories without any restrictions. - C(SMB_FORBIDDEN) - A directory rename from the SMB protocol will be denied if at least one file is opened in the directory or in one of its child directories. - C(All_FORBIDDEN) - Any directory rename request will be denied regardless of the protocol used, if at least one file is opened in the directory or in one of its child directories. type: str is_async_mtime_enabled: description: - Indicates whether asynchronous MTIME is enabled on the file system or protocol snaps that are mounted writeable. type: bool file_events_publishing_mode: choices: - DISABLE - SMB_ONLY - NFS_ONLY - ALL description: - State of the event notification services for all file systems of the NAS server. - It can only be set to C(NFS_ONLY) when I(config_typ) is set to C(VMWARE). type: str
changed: description: Whether or not the resource has changed. returned: always sample: 'false' type: bool filesystem_details: contains: access_policy: description: Access policy about the filesystem. type: str access_type: description: Indicates whether the snapshot directory or protocol access is granted to the file system snapshot. type: str config_type: description: Indicates the file system type. type: str creation_timestamp: description: Time, in seconds, when the snapshot was created. type: str creator_type: description: Snapshot creator type. type: str default_hard_limit: description: Default hard limit period for a filesystem quota in byte. type: int default_soft_limit: description: Default soft limit period for a filesystem quota in byte. type: int description: description: The description about the filesystem. type: str expiration_timestamp: description: Time, in seconds, when the snapshot will expire. type: str file_events_publishing_mode: description: State of the event notification services for all file systems of the NAS server. type: str filesystem_type: description: Indicates the type of a file system. type: str flr_attributes: contains: auto_delete: description: Indicates whether locked files will be automatically deleted from an FLR-enabled file system once their retention periods have expired. type: bool auto_lock: description: Indicates whether to automatically lock files in an FLR-enabled file system. type: bool clock_time: description: Per file system clock used to track the retention date. type: str default_retention: description: The default retention period that is used in an FLR-enabled file system when a file is locked and a retention period is not specified. type: str has_protected_files: description: Indicates whether FLR file system has protected files. type: bool maximum_retention: description: The longest retention period for which files on an FLR-enabled file system can be locked and protected from deletion. type: str maximum_retention_date: description: Maximum date and time that has been set on any locked file in an FLR-enabled file system, which means that the file system itself will be protected until this date and time. type: str minimum_retention: description: The shortest retention period for which files on an FLR-enabled file system can be locked and protected from deletion. type: str mode: description: The FLR type of the file system. type: str policy_interval: description: Indicates how long to wait (in seconds) after files are modified before the files are automatically locked. type: int description: The file retention attributes. type: complex folder_rename_policy: description: File system folder rename policies for the file system with multiprotocol access enabled. type: str grace_period: description: Default grace period for a filesystem quota in second. type: int host_io_size: description: Typical size of writes from the server or other computer using the VMware file system to the storage system. type: str id: description: The system generated ID given to the filesystem. type: str is_async_MTime_enabled: description: Indicates whether asynchronous MTIME is enabled on the file system. type: bool is_modified: description: Indicates whether the snapshot may have changed since it was created. type: bool is_quota_enabled: description: Indicates whether quota is enabled. type: bool is_smb_no_notify_enabled: description: Whether smb notify policy is enabled for a filesystem. type: bool is_smb_notify_on_access_enabled: description: Whether smb on access notify policy is enabled. type: bool is_smb_notify_on_write_enabled: description: Indicates whether file writes notifications are enabled on the file system. type: bool is_smb_op_locks_enabled: description: Whether smb op lock is enabled. type: bool is_smb_sync_writes_enabled: description: Indicates whether the synchronous writes option is enabled on the file system. type: bool last_refresh_timestamp: description: Time, in seconds, when the snapshot was last refreshed. type: str last_writable_timestamp: description: If not mounted, and was previously mounted, the time (in seconds) of last mount. type: str locking_policy: description: Locking policy about the filesystem. type: str name: description: Name of the filesystem. type: str nas_server: description: Id and name of the nas server to which the filesystem belongs. type: dict parent_id: description: Unique identifier of the object of the parent of this file system. type: str protection_policy: description: Id and name of the protection policy associated with the filesystem. type: dict size_total: description: Total size of the filesystem in bytes. type: int size_used: description: Used size of the filesystem in bytes. type: int smb_notify_on_change_dir_depth: description: Lowest directory level to which the enabled notifications apply, if any. type: int snapshots: description: Id and name of the snapshots of a filesystem. type: list total_size_with_unit: description: Total size of the filesystem with appropriate unit. type: str used_size_with_unit: description: Used size of the filesystem with appropriate unit. type: str description: Details of the filesystem. returned: When filesystem exists sample: access_policy: Native access_policy_l10n: Native access_type: null access_type_l10n: null creation_timestamp: null creator_type: null creator_type_l10n: null default_hard_limit: 0 default_soft_limit: 0 description: null expiration_timestamp: null filesystem_type: Primary filesystem_type_l10n: Primary folder_rename_policy: All_Forbidden folder_rename_policy_l10n: All Renames Forbidden grace_period: 604800 id: 61e49f3f-9b57-e69b-1038-aa02b52a030f is_async_MTime_enabled: false is_modified: false is_quota_enabled: false is_smb_no_notify_enabled: false is_smb_notify_on_access_enabled: false is_smb_notify_on_write_enabled: false is_smb_op_locks_enabled: true is_smb_sync_writes_enabled: true last_refresh_timestamp: null last_writable_timestamp: null locking_policy: Advisory locking_policy_l10n: Advisory name: sample-filesystem nas_server: id: 6026056b-5405-0e36-7697-c285b9fa42b7 name: ansible_nas_server_2 parent_id: null protection_policy: null size_total: '214748364800' size_used: '1621098496' smb_notify_on_change_dir_depth: 512 snapshots: {} total_size_with_unit: 200.0 GB used_size_with_unit: 1.51 GB type: complex is_filesystem_cloned: description: Whether or not the clone of filesystem is created. returned: always sample: 'false' type: bool is_filesystem_refreshed: description: Whether or not the filesystem is refreshed. returned: always sample: 'false' type: bool is_filesystem_restored: description: Whether or not the filesystem is restored. returned: always sample: 'false' type: bool