dellemc / dellemc.powermax / 3.0.0 / module / snapshot Manage Snapshots on PowerMax/VMAX Storage System | "added in version" 1.0.0 of dellemc.powermax" Authors: Prashant Rakheja (@prashant-dell) <ansible.team@dell.com>, Rajshree Khare (@khareRajshree) <ansible.team@dell.com>dellemc.powermax.snapshot (3.0.0) — module
Install with ansible-galaxy collection install dellemc.powermax:==3.0.0
collections: - name: dellemc.powermax version: 3.0.0
Managing snapshots on a PowerMax storage system includes creating a new storage group (SG) snapshot, getting details of the SG snapshot, renaming the SG snapshot, changing the snapshot link status, and deleting an existing SG snapshot.
- name: Create a Snapshot for a Storage Group dellemc.powermax.snapshot: unispherehost: "{{unispherehost}}" universion: "{{universion}}" verifycert: "{{verifycert}}" user: "{{user}}" password: "{{password}}" serial_no: "{{serial_no}}" sg_name: "ansible_sg" snapshot_name: "ansible_sg_snap" ttl: "2" ttl_unit: "days" state: "present"
- name: Get Storage Group Snapshot details dellemc.powermax.snapshot: unispherehost: "{{unispherehost}}" universion: "{{universion}}" verifycert: "{{verifycert}}" user: "{{user}}" password: "{{password}}" serial_no: "{{serial_no}}" sg_name: "ansible_sg" snapshot_name: "ansible_sg_snap" state: "present"
- name: Get Storage Group Snapshot details using generation dellemc.powermax.snapshot: unispherehost: "{{unispherehost}}" universion: "{{universion}}" verifycert: "{{verifycert}}" user: "{{user}}" password: "{{password}}" serial_no: "{{serial_no}}" sg_name: "ansible_sg" snapshot_name: "ansible_sg_snap" generation: 1 state: "present"
- name: Get Storage Group Snapshot details using snapshot_id dellemc.powermax.snapshot: unispherehost: "{{unispherehost}}" universion: "{{universion}}" verifycert: "{{verifycert}}" user: "{{user}}" password: "{{password}}" serial_no: "{{serial_no}}" sg_name: "ansible_sg" snapshot_name: "ansible_sg_snap" snapshot_id: 135023964929 state: "present"
- name: Rename Storage Group Snapshot using generation dellemc.powermax.snapshot: unispherehost: "{{unispherehost}}" universion: "{{universion}}" verifycert: "{{verifycert}}" user: "{{user}}" password: "{{password}}" serial_no: "{{serial_no}}" sg_name: "ansible_sg" snapshot_name: "ansible_sg_snap" new_snapshot_name: "ansible_snap_new" generation: 0 state: "present"
- name: Rename Storage Group Snapshot using snapshot_id dellemc.powermax.snapshot: unispherehost: "{{unispherehost}}" universion: "{{universion}}" verifycert: "{{verifycert}}" user: "{{user}}" password: "{{password}}" serial_no: "{{serial_no}}" sg_name: "ansible_sg" snapshot_name: "ansible_sg_snap" new_snapshot_name: "ansible_snap_new" snapshot_id: 135023964929 state: "present"
- name: Change Snapshot Link Status to Linked using generation dellemc.powermax.snapshot: unispherehost: "{{unispherehost}}" universion: "{{universion}}" verifycert: "{{verifycert}}" user: "{{user}}" password: "{{password}}" serial_no: "{{serial_no}}" sg_name: "ansible_sg" snapshot_name: "ansible_snap_new" generation: 1 target_sg_name: "ansible_sg_target" link_status: "linked" state: "present"
- name: Change Snapshot Link Status to UnLinked using generation dellemc.powermax.snapshot: unispherehost: "{{unispherehost}}" universion: "{{universion}}" verifycert: "{{verifycert}}" user: "{{user}}" password: "{{password}}" serial_no: "{{serial_no}}" sg_name: "ansible_sg" snapshot_name: "ansible_snap_new" generation: 1 target_sg_name: "ansible_sg_target" link_status: "unlinked" state: "present"
- name: Change Snapshot Link Status to Linked using snapshot_id dellemc.powermax.snapshot: unispherehost: "{{unispherehost}}" universion: "{{universion}}" verifycert: "{{verifycert}}" user: "{{user}}" password: "{{password}}" serial_no: "{{serial_no}}" sg_name: "ansible_sg" snapshot_name: "ansible_snap_new" snapshot_id: 135023964515 target_sg_name: "ansible_sg_target" link_status: "linked" state: "present"
- name: Change Snapshot Link Status to UnLinked using snapshot_id dellemc.powermax.snapshot: unispherehost: "{{unispherehost}}" universion: "{{universion}}" verifycert: "{{verifycert}}" user: "{{user}}" password: "{{password}}" serial_no: "{{serial_no}}" sg_name: "ansible_sg" snapshot_name: "ansible_snap_new" snapshot_id: 135023964515 target_sg_name: "ansible_sg_target" link_status: "unlinked" state: "present"
- name: Delete Storage Group Snapshot using generation dellemc.powermax.snapshot: unispherehost: "{{unispherehost}}" universion: "{{universion}}" verifycert: "{{verifycert}}" user: "{{user}}" password: "{{password}}" serial_no: "{{serial_no}}" sg_name: "ansible_sg" snapshot_name: "ansible_sg_snap" generation: 1 state: "absent"
- name: Delete Storage Group Snapshot using snapshot_id dellemc.powermax.snapshot: unispherehost: "{{unispherehost}}" universion: "{{universion}}" verifycert: "{{verifycert}}" user: "{{user}}" password: "{{password}}" serial_no: "{{serial_no}}" sg_name: "ansible_sg" snapshot_name: "ansible_sg_snap" snapshot_id: 135023964929 state: "absent"
ttl: description: - The Time To Live (TTL) value for the snapshot. - If the TTL is not specified, the storage group snap details are returned. - However, to create a SG snap - TTL must be given. - If the SG snap should not have any TTL - specify TTL as "None". type: str user: description: - The username of the Unisphere host. required: true type: str state: choices: - absent - present description: - Define whether the snapshot should exist or not. required: true type: str sg_name: description: - The name of the storage group. 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 password: description: - The password of the Unisphere host. required: true type: str ttl_unit: choices: - hours - days default: days description: - The unit for the ttl. - If no ttl_unit is specified, 'days' is taken as default ttl_unit. type: str serial_no: description: - The serial number of the PowerMax/VMAX array. It is a required parameter for all array-specific operations except for getting a list of arrays in the Gatherfacts module. required: true type: str generation: description: - The generation number of the snapshot. - Generation is required for link, unlink, rename and delete operations. - Optional for Get snapshot details. - Create snapshot will always create a new snapshot with a generation number 0. - Rename is supported only for generation number 0. type: int universion: choices: - 91 - 92 - 100 - 101 description: - Unisphere version, currently '91', '92', '100' and '101' versions are supported. required: false type: int verifycert: description: - Specifies system whether to validate SSL certificate or not, Values can be True or False or a custom file path for SSL certificate with .pem extension or .cer with base 64 encoding. required: true type: str link_status: choices: - linked - unlinked description: - Describes the link status of the snapshot. type: str snapshot_id: description: - Unique ID of the snapshot. - snapshot_id is required for link, unlink, rename and delete operations. - Optional for Get snapshot details. type: int snapshot_name: description: - The name of the snapshot. required: true type: str unispherehost: description: - IP or FQDN of the Unisphere host required: true type: str target_sg_name: description: - The target storage group. type: str new_snapshot_name: description: - The new name of the snapshot. type: str
changed: description: Whether or not the resource has changed. returned: always type: bool create_sg_snap: description: Flag sets to true when the snapshot is created. returned: When snapshot is created. type: bool delete_sg_snap: description: Flag sets to true when the snapshot is deleted. returned: When snapshot is deleted. type: bool rename_sg_snap: description: Flag sets to true when the snapshot is renamed. returned: When snapshot is renamed. type: bool sg_snap_details: contains: expired: description: Indicates whether the snapshot is expired or not. type: bool generation/snapid: description: The generation/snapshot ID of the snapshot. type: int linked: description: Indicates whether the snapshot is linked or not. type: bool name: description: Name of the snapshot. type: str non_shared_tracks: description: Number of non-shared tracks. type: int num_source_volumes: description: Number of source volumes. type: int num_storage_group_volumes: description: Number of storage group volumes. type: int restored: description: Indicates whether the snapshot is restored or not. type: bool source_volume: contains: capacity: description: Volume capacity. type: int capacity_gb: description: Volume capacity in GB. type: int name: description: Volume ID. type: str description: Source volume details. type: list state: description: State of the snapshot. type: str time_to_live_expiry_date: description: Time to live expiry date. type: str timestamp: description: Snapshot time stamp. type: str timestamp_utc: description: Snapshot time stamp specified in UTC. type: int tracks: description: Number of tracks. type: int description: Details of the snapshot. returned: When snapshot exists. type: complex