community.hrobot.storagebox_snapshot module – Create, update, or delete a snapshot of a storage box
Note
This module is part of the community.hrobot collection (version 2.3.0).
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 community.hrobot
.
To use it in a playbook, specify: community.hrobot.storagebox_snapshot
.
New in community.hrobot 2.3.0
Synopsis
Create, update comment, or delete a snapshot of a storage box.
Parameters
Parameter |
Comments |
---|---|
The password for the Robot web-service user. |
|
The username for the Robot web-service user. |
|
Timeout (in seconds) for waiting when rate limit exceeded errors are returned. Set to Set to a negative value like Default: |
|
The comment to set for the snapshot. |
|
The name of the snapshot to comment or delete. The snapshot name is automatically generated and should not be specified when creating a snapshot. Required when setting |
|
The state of the snapshot. Choices:
|
|
The ID of the storage box to snapshot. |
Attributes
Attribute |
Support |
Description |
---|---|---|
Action group: community.hrobot.robot |
Use |
|
Support: full |
Can run in |
|
Support: none |
Will return details on what has changed (or possibly needs changing in |
|
Support: partial This module is not idempotent when creating a snapshot. |
When run twice in a row outside check mode, with the same arguments, the second invocation indicates no change. This assumes that the system controlled/queried by the module has not changed in a relevant way. |
Examples
---
- name: Create a snapshot
community.hrobot.storagebox_snapshot:
storagebox_id: 12345
# The snapshot name is automatically generated and should not be specified.
- name: Delete a snapshot
community.hrobot.storagebox_snapshot:
storagebox_id: 12345
snapshot_name: "2025-01-21T12-40-38"
state: absent
- name: Update snapshot comment
community.hrobot.storagebox_snapshot:
storagebox_id: 12345
snapshot_name: "2025-01-21T12-40-38"
snapshot_comment: "This is an updated comment"
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
The snapshot that was created. Returned: success and |
|
The name of the snapshot. Returned: success Sample: |
|
The size of the snapshot in MB. Returned: success Sample: |
|
Timestamp of snapshot in UTC Returned: success Sample: |