community.hrobot.storagebox_snapshot_info module – Query the snapshots for a storage box

Note

This module is part of the community.hrobot collection (version 2.4.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_info.

New in community.hrobot 2.4.0

Synopsis

  • Query the snapshots for a storage box.

Parameters

Parameter

Comments

hetzner_password

string / required

The password for the Robot web-service user.

hetzner_user

string / required

The username for the Robot web-service user.

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 0 to not retry.

Set to a negative value like -1 to retry forever.

Default: -1

storagebox_id

integer / required

The ID of the storage box to query.

Attributes

Attribute

Support

Description

action_group

Action group: community.hrobot.robot

Use group/community.hrobot.robot in module_defaults to set defaults for this module.

check_mode

Support: full

This action does not modify state.

Can run in check_mode and return changed status prediction without modifying target.

diff_mode

Support: N/A

This action does not modify state.

Will return details on what has changed (or possibly needs changing in check_mode), when in diff mode.

idempotent

Support: full

This action does not modify state.

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: Query the snapshots
  community.hrobot.storagebox_snapshot_info:
    hetzner_user: foo
    hetzner_password: bar
    id: 123
  register: result

- name: Output data
  ansible.builtin.debug:
    msg: "Timestamp of the first snapshot : {{ result.snapshots[0].timestamp }}"

Return Values

Common return values are documented here, the following are the fields unique to this module:

Key

Description

snapshots

list / elements=dictionary

The storage box’s info.

All date and time parameters are in UTC.

Returned: success

automatic

boolean

Whether the snapshot was created automatically.

Returned: success

Sample: false

comment

string

The comment for the snapshot.

Returned: success

Sample: "This is a snapshot"

filesystem_size

integer

The size of the Storage Box at creation time of the snapshot in MB.

Returned: success

Sample: 12345

name

string

The snapshot name.

Returned: success

Sample: "2025-01-21T12-40-38"

size

integer

The Snapshot size in MB.

Returned: success

Sample: 400

timestamp

string

The timestamp of snapshot in UTC.

Returned: success

Sample: "2025-01-21T13:40:38+00:00"

Authors

  • Matthias Hurdebise (@matthiashurdebise)