dellemc.unity.filesystem_snapshot module – Manage filesystem snapshot on the Unity storage system
Note
This module is part of the dellemc.unity collection (version 1.7.1).
You might already have this collection installed if you are using the ansible
package.
It is not included in ansible-core
.
To check whether it is installed, run ansible-galaxy collection list
.
To install it, use: ansible-galaxy collection install dellemc.unity
.
You need further requirements to be able to use this module,
see Requirements for details.
To use it in a playbook, specify: dellemc.unity.filesystem_snapshot
.
New in dellemc.unity 1.1.0
Synopsis
Managing Filesystem Snapshot on the Unity storage system includes create filesystem snapshot, get filesystem snapshot, modify filesystem snapshot and delete filesystem snapshot.
Aliases: dellemc_unity_filesystem_snapshot
Requirements
The below requirements are needed on the host that executes this module.
A Dell Unity Storage device version 5.1 or later.
Ansible-core 2.13 or later.
Python 3.9, 3.10 or 3.11.
Storops Python SDK 1.2.11.
Parameters
Parameter |
Comments |
---|---|
This option specifies whether or not the filesystem snapshot will be automatically deleted. If set to If set to Option auto_delete can not be set to If during creation neither auto_delete nor expiry_time is mentioned then the filesystem snapshot will be created keeping auto_delete as Once the expiry_time is set, then the filesystem snapshot cannot be assigned to the auto delete policy. Choices:
|
|
The additional information about the filesystem snapshot can be provided using this option. The description can be removed by passing an empty string. |
|
This option is for specifying the date and time after which the filesystem snapshot will expire. The time is to be mentioned in UTC timezone. The format is “MM/DD/YYYY HH:MM”. Year must be in 4 digits. |
|
The ID of the Filesystem for which snapshot is created. For creation of filesystem snapshot either filesystem_id or filesystem_name is required. Not required for other operations. |
|
The name of the Filesystem for which snapshot is created. For creation of filesystem snapshot either filesystem_name or filesystem_id is required. Not required for other operations. |
|
Access type of the filesystem snapshot. Required only during creation of filesystem snapshot. If not given, snapshot’s access type will be Choices:
|
|
The ID of the NAS server in which the Filesystem is created. For creation of filesystem snapshot either filesystem_id or filesystem_name is required. Not required for other operations. |
|
The name of the NAS server in which the Filesystem is created. For creation of filesystem snapshot either nas_server_name or nas_server_id is required. Not required for other operations. |
|
The password of the Unity management server. |
|
Port number through which communication happens with Unity management server. Default: |
|
During creation snapshot_id is auto generated. For all other operations either snapshot_id or snapshot_name is required. |
|
The name of the filesystem snapshot. Mandatory parameter for creating a filesystem snapshot. For all other operations either snapshot_name or snapshot_id is required. |
|
The state option is used to mention the existence of the filesystem snapshot. Choices:
|
|
IP or FQDN of the Unity management server. |
|
The username of the Unity management server. |
|
Boolean variable to specify whether or not to validate SSL certificate.
Choices:
|
Notes
Note
Filesystem snapshot cannot be deleted, if it has nfs or smb share.
The check_mode is not supported.
The modules present in this collection named as ‘dellemc.unity’ are built to support the Dell Unity storage platform.
Examples
- name: Create Filesystem Snapshot
dellemc.unity.filesystem_snapshot:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
validate_certs: "{{validate_certs}}"
snapshot_name: "ansible_test_FS_snap"
filesystem_name: "ansible_test_FS"
nas_server_name: "lglad069"
description: "Created using playbook"
auto_delete: true
fs_access_type: "Protocol"
state: "present"
- name: Create Filesystem Snapshot with expiry time
dellemc.unity.filesystem_snapshot:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
validate_certs: "{{validate_certs}}"
snapshot_name: "ansible_test_FS_snap_1"
filesystem_name: "ansible_test_FS_1"
nas_server_name: "lglad069"
description: "Created using playbook"
expiry_time: "04/15/2021 2:30"
fs_access_type: "Protocol"
state: "present"
- name: Get Filesystem Snapshot Details using Name
dellemc.unity.filesystem_snapshot:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
validate_certs: "{{validate_certs}}"
snapshot_name: "ansible_test_FS_snap"
state: "present"
- name: Get Filesystem Snapshot Details using ID
dellemc.unity.filesystem_snapshot:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
validate_certs: "{{validate_certs}}"
snapshot_id: "10008000403"
state: "present"
- name: Update Filesystem Snapshot attributes
dellemc.unity.filesystem_snapshot:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
validate_certs: "{{validate_certs}}"
snapshot_name: "ansible_test_FS_snap"
description: "Description updated"
auto_delete: false
expiry_time: "04/15/2021 5:30"
state: "present"
- name: Update Filesystem Snapshot attributes using ID
dellemc.unity.filesystem_snapshot:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
validate_certs: "{{validate_certs}}"
snapshot_id: "10008000403"
expiry_time: "04/18/2021 8:30"
state: "present"
- name: Delete Filesystem Snapshot using Name
dellemc.unity.filesystem_snapshot:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
validate_certs: "{{validate_certs}}"
snapshot_name: "ansible_test_FS_snap"
state: "absent"
- name: Delete Filesystem Snapshot using ID
dellemc.unity.filesystem_snapshot:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
validate_certs: "{{validate_certs}}"
snapshot_id: "10008000403"
state: "absent"
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
Whether or not the resource has changed. Returned: always Sample: |
|
Details of the filesystem snapshot. Returned: When filesystem snapshot exists Sample: |
|
Access type of filesystem snapshot. Returned: success |
|
Attached WWN details. Returned: success |
|
Creation time of filesystem snapshot. Returned: success |
|
Creator schedule of filesystem snapshot. Returned: success |
|
Creator type for filesystem snapshot. Returned: success |
|
Creator user for filesystem snapshot. Returned: success |
|
Description of the filesystem snapshot. Returned: success |
|
Date and time after which the filesystem snapshot will expire. Returned: success |
|
Id of the filesystem for which the snapshot exists. Returned: success |
|
Name of the filesystem for which the snapshot exists. Returned: success |
|
Unique identifier of the filesystem snapshot instance. Returned: success |
|
Is the filesystem snapshot is auto deleted or not. Returned: success |
|
The name of the filesystem snapshot. Returned: success |
|
Id of the NAS server on which filesystem exists. Returned: success |
|
Name of the NAS server on which filesystem exists. Returned: success |
|
Size of the filesystem snapshot. Returned: success |