hpe.nimble.hpe_nimble_snapshot module – Manage the HPE Nimble Storage snapshots
Note
This module 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
.
You need further requirements to be able to use this module,
see Requirements for details.
To use it in a playbook, specify: hpe.nimble.hpe_nimble_snapshot
.
Note
The hpe.nimble collection is considered unmaintained and will be removed from Ansible 10. See the discussion thread for more information.
New in hpe.nimble 1.0.0
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 |
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:
|
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