hpe.nimble.hpe_nimble_snapshot – Manage the HPE Nimble Storage snapshots

Note

This plugin is part of the hpe.nimble collection (version 1.1.4).

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 hpe.nimble.

To use it in a playbook, specify: hpe.nimble.hpe_nimble_snapshot.

New in version 1.0.0: of hpe.nimble

Synopsis

  • Manage the snapshots on an HPE Nimble Storage group.

Requirements

The below requirements are needed on the host that executes this module.

  • Ansible 2.9 or later

  • Python 3.6 or later

  • HPE Nimble Storage SDK for Python

  • HPE Nimble Storage arrays running NimbleOS 5.0 or later

Parameters

Parameter Choices/Defaults Comments
agent_type
string
    Choices:
  • none
  • smis
  • vvol
  • openstack
  • openstackv2
External management agent type.
app_uuid
string
Application identifier of snapshot.
change_name
string
Change name of the existing snapshot.
description
string
Text description of snapshot.
expiry_after
integer
Number of seconds after which this snapshot is considered expired by snapshot TTL. A value of 0 indicates that snapshot never expires.
force
boolean
    Choices:
  • no
  • yes
Forcibly delete the specified snapshot even if it is the last replicated collection. Doing so could lead to full re-seeding at the next replication.
host
string / required
HPE Nimble Storage IP address.
metadata
dictionary
Key-value pairs that augment a snapshot's attributes. List of key-value pairs. Keys must be unique and non-empty.
name
string / required
Name of the snapshot.
online
boolean
    Choices:
  • no
  • yes
Online state for a snapshot means it could be mounted for data restore.
password
string / required
HPE Nimble Storage password.
state
string / required
    Choices:
  • present
  • absent
  • create
The snapshot state.
username
string / required
HPE Nimble Storage user name.
volume
string / required
Parent volume name.
writable
boolean
    Choices:
  • no
  • yes
Allow snapshot to be writable. Mandatory and must be set to 'true' for VSS application synchronized snapshots.

Notes

Note

  • This module does not support check_mode.

Examples

# if state is create , then create a snapshot if not present. Fails if already present.
# if state is present, then create a snapshot if not present. Succeeds if it already exists.
- name: Create snapshot if not present
  hpe.nimble.hpe_nimble_snapshot:
    host: "{{ host }}"
    username: "{{ username }}"
    password: "{{ password }}"
    state: "{{ state | default('present') }}"
    volume: "{{ volume }}"
    name: "{{ name }}"
    online: "{{ online | default(true) }}"
    writable: "{{ writable | default(false) }}"

- name: Delete snapshot  (must be offline)
  hpe.nimble.hpe_nimble_snapshot:
    host: "{{ host }}"
    username: "{{ username }}"
    password: "{{ password }}"
    volume: "{{ volume }}"
    name: "{{ name }}"
    state: absent

Authors