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.5.0).
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 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 |
|---|---|
hetzner_password string | The password for the Robot web-service user. If |
hetzner_token string added in community.hrobot 2.5.0 | The API token for the Robot web-service user. One of |
hetzner_user string | The username for the Robot web-service user. One of If |
rate_limit_retry_timeout integer added in community.hrobot 2.1.0 | Timeout (in seconds) for waiting when rate limit exceeded errors are returned. Set to Set to a negative value like Default: |
snapshot_comment string | The comment to set for the snapshot. |
snapshot_name string | 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 |
state string | The state of the snapshot. Choices:
|
storagebox_id integer / required | The ID of the storage box to snapshot. |
Attributes
Attribute | Support | Description |
|---|---|---|
action_group | Action groups: community.hrobot.api, community.hrobot.robot | Use |
check_mode | Support: full | Can run in |
diff_mode | Support: none | Will return details on what has changed (or possibly needs changing in |
idempotent | 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 |
|---|---|
snapshot dictionary | The snapshot that was created or updated. Returned: success and |
|
name string |
The name of the snapshot. Returned: success Sample: |
|
size integer |
The size of the snapshot in MB. Returned: success Sample: |
|
timestamp string |
Timestamp of snapshot in UTC Returned: success Sample: |
Collection links
© 2012–2018 Michael DeHaan
© 2018–2025 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/latest/collections/community/hrobot/storagebox_snapshot_module.html