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
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 |
Comments |
---|---|
External management agent type. Choices:
|
|
Application identifier of snapshot. |
|
Change name of the existing snapshot. |
|
Text description of snapshot. |
|
Number of seconds after which this snapshot is considered expired by snapshot TTL. A value of 0 indicates that snapshot never expires. |
|
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. Choices:
|
|
HPE Nimble Storage IP address. |
|
Key-value pairs that augment a snapshot’s attributes. List of key-value pairs. Keys must be unique and non-empty. |
|
Name of the snapshot. |
|
Online state for a snapshot means it could be mounted for data restore. Choices:
|
|
HPE Nimble Storage password. |
|
The snapshot state. Choices:
|
|
HPE Nimble Storage user name. |
|
Parent volume name. |
|
Allow snapshot to be writable. Mandatory and must be set to ‘true’ for VSS application synchronized snapshots. Choices:
|
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
HPE Nimble Storage Ansible Team (@ar-india) <nimble-dcs-storage-automation-eng@hpe.com>