W3cubDocs

/Ansible

netapp_eseries.santricity.na_santricity_snapshot – NetApp E-Series storage system’s snapshots.

Note

This plugin is part of the netapp_eseries.santricity collection (version 1.2.13).

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 netapp_eseries.santricity.

To use it in a playbook, specify: netapp_eseries.santricity.na_santricity_snapshot.

Synopsis

  • Manage NetApp E-Series manage the storage system’s snapshots.

Parameters

Parameter Choices/Defaults Comments
alert_threshold_pct
integer
Default:
75
Percent of filled reserve capacity to issue alert.
api_password
string / required
The password to authenticate with the SANtricity Web Services Proxy or Embedded Web Services API.
api_url
string / required
The url to the SANtricity Web Services Proxy or Embedded Web Services API.
Example https://prod-1.wahoo.acme.com:8443/devmgr/v2
api_username
string / required
The username to authenticate with the SANtricity Web Services Proxy or Embedded Web Services API.
group_name
string / required
Name of the snapshot consistency group or snapshot volume.
Be sure to use different names for snapshot consistency groups and snapshot volumes to avoid name conflicts.
maximum_snapshots
integer
Default:
32
Total number of snapshot images to maintain.
pit_description
string
Arbitrary description for a consistency group's snapshot images
pit_name
string
Name of a consistency group's snapshot images.
pit_timestamp
string
Snapshot image timestamp in the YYYY-MM-DD HH:MM:SS (AM|PM) (hours, minutes, seconds, and day-period are optional)
Define only as much time as necessary to distinguish the desired snapshot image from the others.
24 hour time will be assumed if day-period indicator (AM, PM) is not specified.
The terms latest and oldest may be used to select newest and oldest consistency group images.
Mutually exclusive with pit_name or pit_description
preferred_reserve_storage_pool
string
Default preferred storage pool or volume group for the reserve capacity volume.
The base volume's storage pool or volume group will be selected by default if not defined.
Used to specify storage pool or volume group for both snapshot consistency group volume members and snapshot volumes
reserve_capacity_full_policy
string
    Choices:
  • purge
  • reject
Policy for full reserve capacity.
Purge deletes the oldest snapshot image for the base volume in the consistency group.
Reject writes to base volume (keep snapshot images valid).
reserve_capacity_pct
integer
Default:
40
Default percentage of base volume capacity to reserve for snapshot copy-on-writes (COW).
Used to define reserve capacity for both snapshot consistency group volume members and snapshot volumes.
rollback_backup
boolean
    Choices:
  • no
  • yes
Whether a point-in-time snapshot should be taken prior to performing a rollback.
rollback_priority
string
    Choices:
  • highest
  • high
  • medium
  • low
  • lowest
Storage system priority given to restoring snapshot point in time.
ssid
string
Default:
1
The ID of the array to manage. This value must be unique for each array.
state
string
    Choices:
  • absent
  • present
  • rollback
When state==absent ensures the type has been removed.
When state==present ensures the type is available.
When state==rollback the consistency group will be rolled back to the point-in-time snapshot images selected by pit_name or pit_timestamp.
state==rollback will always return changed since it is not possible to evaluate the current state of the base volume in relation to a snapshot image.
type
string
    Choices:
  • group
  • pit
  • view
Type of snapshot object to effect.
Group indicates a snapshot consistency group; consistency groups may have one or more base volume members which are defined in volumes.
Pit indicates a snapshot consistency group point-in-time image(s); a snapshot image will be taken of each base volume when state==present.
Warning! When state==absent and type==pit, pit_name or pit_timestamp must be defined and all point-in-time images created prior to the selection will also be deleted.
View indicates a consistency group snapshot volume of particular point-in-time image(s); snapshot volumes will be created for each base volume member.
Views are created from images from a single point-in-time so once created they cannot be modified.
validate_certs
boolean
    Choices:
  • no
  • yes
Should https certificates be validated?
view_host
string
Default host or host group to map snapshot volumes.
view_name
string
Consistency group snapshot volume group.
Required when state==volume or when ensuring the views absence when state==absent.
view_validate
boolean
    Choices:
  • no
  • yes
Default whether snapshop volumes should be validated.
view_writable
boolean
    Choices:
  • no
  • yes
Default whether snapshot volumes should be writable.
volumes
list / elements=string
Details for each consistency group base volume for defining reserve capacity, preferred reserve capacity storage pool, and snapshot volume options.
When state==present and type==group the volume entries will be used to add or remove base volume from a snapshot consistency group.
When state==present and type==view the volume entries will be used to select images from a point-in-time for their respective snapshot volumes.
If state==present and type==view and volume is not specified then all volumes will be selected with the defaults.
Views are created from images from a single point-in-time so once created they cannot be modified.
When state==rollback then volumes can be used to specify which base volumes to rollback; otherwise all consistency group volumes will rollback.
preferred_reserve_storage_pool
string
Preferred storage pool or volume group for the reserve capacity volume.
The base volume's storage pool or volume group will be selected by default if not defined.
Used to specify storage pool or volume group for both snapshot consistency group volume members and snapshot volumes
reserve_capacity_pct
integer
Default:
40
Percentage of base volume capacity to reserve for snapshot copy-on-writes (COW).
Used to define reserve capacity for both snapshot consistency group volume members and snapshot volumes.
snapshot_volume_host
string
Host or host group to map snapshot volume.
snapshot_volume_validate
boolean
    Choices:
  • no
  • yes
Whether snapshot volume should be validated which includes both a media scan and parity validation.
snapshot_volume_writable
boolean
    Choices:
  • no
  • yes
Whether snapshot volume of base volume images should be writable.
volume
string / required
Base volume for consistency group.

Notes

Note

  • Key-value pairs are used to keep track of snapshot names and descriptions since the snapshot point-in-time images do have metadata associated with their data structures; therefore, it is necessary to clean out old keys that are no longer associated with an actual image. This cleaning action is performed each time this module is executed.
  • The E-Series Ansible modules require either an instance of the Web Services Proxy (WSP), to be available to manage the storage-system, or an E-Series storage-system that supports the Embedded Web Services API.
  • Embedded Web Services is currently available on the E2800, E5700, EF570, and newer hardware models.
  • M(netapp_e_storage_system) may be utilized for configuring the systems managed by a WSP instance.

Examples

- name: Ensure snapshot consistency group exists.
  na_santricity_snapshot:
    ssid: "1"
    api_url: https://192.168.1.100:8443/devmgr/v2
    api_username: admin
    api_password: adminpass
    state: present
    type: group
    group_name: snapshot_group1
    volumes:
      - volume: vol1
        reserve_capacity_pct: 20
        preferred_reserve_storage_pool: vg1
      - volume: vol2
        reserve_capacity_pct: 30
      - volume: vol3
    alert_threshold_pct: 80
    maximum_snapshots: 30
- name: Take the current consistency group's base volumes point-in-time snapshot images.
  na_santricity_snapshot:
    ssid: "1"
    api_url: https://192.168.1.100:8443/devmgr/v2
    api_username: admin
    api_password: adminpass
    state: present
    type: pit
    group_name: snapshot_group1
    pit_name: pit1
    pit_description: Initial consistency group's point-in-time snapshot images.
- name: Ensure snapshot consistency group view exists and is mapped to host group.
  na_santricity_snapshot:
    ssid: "1"
    api_url: https://192.168.1.100:8443/devmgr/v2
    api_username: admin
    api_password: adminpass
    state: present
    type: view
    group_name: snapshot_group1
    pit_name: pit1
    view_name: view1
    view_host: view1_hosts_group
    volumes:
      - volume: vol1
        reserve_capacity_pct: 20
        preferred_reserve_storage_pool: vg4
        snapshot_volume_writable: false
        snapshot_volume_validate: true
      - volume: vol2
        reserve_capacity_pct: 20
        preferred_reserve_storage_pool: vg4
        snapshot_volume_writable: true
        snapshot_volume_validate: true
      - volume: vol3
        reserve_capacity_pct: 20
        preferred_reserve_storage_pool: vg4
        snapshot_volume_writable: false
        snapshot_volume_validate: true
    alert_threshold_pct: 80
    maximum_snapshots: 30
- name: Rollback base volumes to consistency group's point-in-time pit1.
  na_santricity_snapshot:
    ssid: "1"
    api_url: https://192.168.1.100:8443/devmgr/v2
    api_username: admin
    api_password: adminpass
    state: present
    type: group
    group_name: snapshot_group1
    pit_name: pit1
    rollback: true
    rollback_priority: high
- name: Ensure snapshot consistency group view no longer exists.
  na_santricity_snapshot:
    ssid: "1"
    api_url: https://192.168.1.100:8443/devmgr/v2
    api_username: admin
    api_password: adminpass
    state: absent
    type: view
    group_name: snapshot_group1
    view_name: view1
- name: Ensure that the consistency group's base volumes point-in-time snapshot images pit1 no longer exists.
  na_santricity_snapshot:
    ssid: "1"
    api_url: https://192.168.1.100:8443/devmgr/v2
    api_username: admin
    api_password: adminpass
    state: absent
    type: image
    group_name: snapshot_group1
    pit_name: pit1
- name: Ensure snapshot consistency group no longer exists.
  na_santricity_snapshot:
    ssid: "1"
    api_url: https://192.168.1.100:8443/devmgr/v2
    api_username: admin
    api_password: adminpass
    state: absent
    type: group
    group_name: snapshot_group1

Return Values

Common return values are documented here, the following are the fields unique to this module:

Key Returned Description
changed
boolean
always
Whether changes have been made.

deleted_metadata_keys
list / elements=string
always
Keys that were purged from the key-value datastore.

group_changes
dictionary
always
All changes performed to the consistency group.



Authors

  • Nathan Swartz (@ndswartz)

© 2012–2018 Michael DeHaan
© 2018–2021 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/latest/collections/netapp_eseries/santricity/na_santricity_snapshot_module.html