dellemc.powerstore.dellemc_powerstore_snapshot (1.3.0) — module

Manage Snapshots on Dell EMC PowerStore.

| "added in version" 1.0.0 of dellemc.powerstore"

Authors: Rajshree Khare (@khareRajshree) <ansible.team@dell.com>, Prashant Rakheja (@prashant-dell) <ansible.team@dell.com>

preview | supported by community

Install collection

Install with ansible-galaxy collection install dellemc.powerstore:==1.3.0


Add to requirements.yml

  collections:
    - name: dellemc.powerstore
      version: 1.3.0

Description

Managing Snapshots on PowerStore storage system, Create a new Volume Group Snapshot, Get details of Volume Group Snapshot, Modify Volume Group Snapshot, Delete an existing Volume Group Snapshot, Create a new Volume Snapshot, Get details of Volume Snapshot, Modify Volume Snapshot, Delete an existing Volume Snapshot.


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
    - name: Create a volume snapshot on PowerStore
      dellemc_powerstore_snapshot:
        array_ip: "{{mgmt_ip}}"
        verifycert: "{{verifycert}}"
        user: "{{user}}"
        password: "{{password}}"
        snapshot_name: "{{snapshot_name}}"
        volume: "{{volume}}"
        description: "{{description}}"
        desired_retention: "{{desired_retention}}"
        retention_unit: "{{retention_unit_days}}"
        state: "{{state_present}}"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
    - name: Get details of a volume snapshot
      dellemc_powerstore_snapshot:
        array_ip: "{{mgmt_ip}}"
        verifycert: "{{verifycert}}"
        user: "{{user}}"
        password: "{{password}}"
        snapshot_name: "{{snapshot_name}}"
        volume: "{{volume}}"
        state: "{{state_present}}"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
    - name: Rename volume snapshot
      dellemc_powerstore_snapshot:
        array_ip: "{{mgmt_ip}}"
        verifycert: "{{verifycert}}"
        user: "{{user}}"
        password: "{{password}}"
        snapshot_name: "{{snapshot_name}}"
        new_snapshot_name: "{{new_snapshot_name}}"
        volume: "{{volume}}"
        state: "{{state_present}}"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
    - name: Delete volume snapshot
      dellemc_powerstore_snapshot:
        array_ip: "{{mgmt_ip}}"
        verifycert: "{{verifycert}}"
        user: "{{user}}"
        password: "{{password}}"
        snapshot_name: "{{new_snapshot_name}}"
        volume: "{{volume}}"
        state: "{{state_absent}}"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
    - name: Create a volume group snapshot on PowerStore
      dellemc_powerstore_snapshot:
        array_ip: "{{mgmt_ip}}"
        verifycert: "{{verifycert}}"
        user: "{{user}}"
        password: "{{password}}"
        snapshot_name: "{{snapshot_name}}"
        volume_group: "{{volume_group}}"
        description: "{{description}}"
        expiration_timestamp: "{{expiration_timestamp}}"
        state: "{{state_present}}"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
    - name: Get details of a volume group snapshot
      dellemc_powerstore_snapshot:
        array_ip: "{{mgmt_ip}}"
        verifycert: "{{verifycert}}"
        user: "{{user}}"
        password: "{{password}}"
        snapshot_name: "{{snapshot_name}}"
        volume_group: "{{volume_group}}"
        state: "{{state_present}}"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
    - name: Modify volume group snapshot expiration timestamp
      dellemc_powerstore_snapshot:
        array_ip: "{{mgmt_ip}}"
        verifycert: "{{verifycert}}"
        user: "{{user}}"
        password: "{{password}}"
        snapshot_name: "{{snapshot_name}}"
        volume_group: "{{volume_group}}"
        description: "{{description}}"
        expiration_timestamp: "{{expiration_timestamp_new}}"
        state: "{{state_present}}"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
    - name: Rename volume group snapshot
      dellemc_powerstore_snapshot:
        array_ip: "{{mgmt_ip}}"
        verifycert: "{{verifycert}}"
        user: "{{user}}"
        password: "{{password}}"
        snapshot_name: "{{snapshot_name}}"
        new_snapshot_name: "{{new_snapshot_name}}"
        volume_group: "{{volume_group}}"
        state: "{{state_present}}"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
    - name: Delete volume group snapshot
      dellemc_powerstore_snapshot:
        array_ip: "{{mgmt_ip}}"
        verifycert: "{{verifycert}}"
        user: "{{user}}"
        password: "{{password}}"
        snapshot_name: "{{new_snapshot_name}}"
        volume_group: "{{volume_group}}"
        state: "{{state_absent}}"

Inputs

    
user:
    description:
    - The username of the PowerStore host.
    required: true
    type: str

state:
    choices:
    - absent
    - present
    description:
    - Defines whether the Snapshot should exist or not.
    required: true
    type: str

volume:
    description:
    - The volume. This could be the volume name or ID.
    type: str

array_ip:
    description:
    - IP or FQDN of the PowerStore management system.
    required: true
    type: str

password:
    description:
    - The password of the PowerStore host.
    required: true
    type: str

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. Set the environment
      variable REQUESTS_CA_BUNDLE to the path of the SSL certificate.
    - False - indicates that the SSL certificate should not be verified.
    required: true
    type: bool

description:
    description:
    - The description for the Snapshot.
    type: str

snapshot_id:
    description:
    - The ID of the Snapshot. Either snapshot ID or Snapshot name is required.
    type: str

volume_group:
    description:
    - The volume group. This could be the volume group name or ID.
    type: str

snapshot_name:
    description:
    - The name of the Snapshot. Either snapshot name or ID is required.
    type: str

retention_unit:
    choices:
    - hours
    - days
    description:
    - The unit for retention.
    - If this unit is not specified, 'hours' is taken as default retention_unit.
    - If desired_retention is specified, expiration_timestamp cannot be specified.
    type: str

desired_retention:
    description:
    - The retention value for the Snapshot.
    - If the retention value is not specified, the Snapshot details would be returned.
    - To create a Snapshot, either a retention or expiration timestamp must be given.
    - If the Snapshot does not have any retention value - specify it as 'None'.
    type: str

new_snapshot_name:
    description:
    - The new name of the Snapshot.
    type: str

expiration_timestamp:
    description:
    - The expiration timestamp of the Snapshot. This should be provided in UTC format,
      e.g 2019-07-24T10:54:54Z.
    type: str

Outputs

changed:
  description: Whether or not the resource has changed
  returned: always
  type: bool
create_vg_snap:
  description: A boolean flag to indicate whether volume group snapshot got created.
  returned: When value exists
  type: bool
create_vol_snap:
  description: A boolean flag to indicate whether volume snapshot got created.
  returned: When value exists
  type: bool
delete_vg_snap:
  description: A boolean flag to indicate whether volume group snapshot got deleted.
  returned: When value exists
  type: bool
delete_vol_snap:
  description: A boolean flag to indicate whether volume snapshot got deleted.
  returned: When value exists
  type: bool
modify_vg_snap:
  description: A boolean flag to indicate whether volume group snapshot got modified.
  returned: When value exists
  type: bool
modify_vol_snap:
  description: A boolean flag to indicate whether volume snapshot got modified.
  returned: When value exists
  type: bool
snap_details:
  contains:
    creation_timestamp:
      description: The creation timestamp of the snapshot.
      type: str
    description:
      description: Description about the snapshot.
      type: str
    id:
      description: The system generated ID given to the snapshot.
      type: str
    name:
      description: Name of the snapshot.
      type: str
    performance_policy_id:
      description: The performance policy for the snapshot.
      type: str
    protection_data:
      contains:
        expiration_timestamp:
          description: The expiration timestamp of the snapshot.
          type: str
      description: The protection data of the snapshot.
      type: complex
    protection_policy_id:
      description: The protection policy of the snapshot.
      type: str
    size:
      description: Size of the snapshot.
      type: int
    state:
      description: The state of the snapshot.
      type: str
    type:
      description: The type of the snapshot.
      type: str
    volumes:
      contains:
        id:
          description: The system generated ID given to the volume associated with
            the volume group.
          type: str
      description: The volumes details of the volume group snapshot.
      type: complex
  description: Details of the snapshot
  returned: When snapshot exists
  type: complex