dellemc.powermax.dellemc_powermax_snapshot (1.6.1) — module

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>

preview | supported by community

Install collection

Install with ansible-galaxy collection install dellemc.powermax:==1.6.1


Add to requirements.yml

  collections:
    - name: dellemc.powermax
      version: 1.6.1

Description

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.


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- 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"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- 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"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- 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"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- 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"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- 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"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- 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"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- 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"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- 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"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- 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"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- 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"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- 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"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- 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"

Inputs

    
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

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
    description:
    - Unisphere version, currently '91' and '92' versions are supported.
    required: false
    type: int

verifycert:
    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

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

Outputs

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