community.hrobot.storagebox_subaccount_info module – Query the subaccounts for a storage box

Note

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

New in community.hrobot 2.4.0

Synopsis

  • Query the subaccounts for a storage box.

Parameters

Parameter

Comments

hetzner_password

string

The password for the Robot web-service user.

If hetzner_password is specified, hetzner_user must also be specified, and hetzner_token must not be specified.

hetzner_token

string

added in community.hrobot 2.5.0

The API token for the Robot web-service user.

One of hetzner_token and hetzner_user must be specified.

hetzner_user

string

The username for the Robot web-service user.

One of hetzner_token and hetzner_user must be specified.

If hetzner_user is specified, hetzner_password must also be specified, and hetzner_token must not be specified.

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 groups: community.hrobot.api, community.hrobot.robot

Use group/community.hrobot.robot or group/community.hrobot.api 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 subaccounts
  community.hrobot.storagebox_subaccount_info:
    hetzner_user: foo
    hetzner_password: bar
    storage_box_id: 123
  register: result

- name: Output data
  ansible.builtin.debug:
    msg: "Username of the first subaccount: {{ result.subaccounts[0].username }}"

Return Values

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

Key

Description

subaccounts

list / elements=dictionary

The storage box’s info.

All date and time parameters are in UTC.

Returned: success

access_settings

dictionary

added in community.hrobot 2.5.0

Access settings of the subaccount.

Returned: success

reachable_externally

boolean

Whether the subaccount is reachable from outside Hetzner’s network.

Returned: success

Sample: true

readonly

boolean

Whether the subaccount is read-only.

Returned: success

Sample: false

samba_enabled

boolean

Whether the subaccount can be accessed through SAMBA.

Returned: success

Sample: false

ssh_enabled

boolean

Whether the subaccount can be accessed through SSH.

Returned: success

Sample: true

webdav_enabled

boolean

Whether the subaccount can be accessed through WebDAV.

Returned: success

Sample: false

accountid

string

Username of the main user.

Not supported by the new Hetzner API.

Returned: success if hetzner_token is not specified

Sample: "u2342"

comment

string

Custom comment for the sub-account.

Note that this is copied from subaccounts[].description in case hetzner_token is specified.

Returned: success

Sample: "This is a subaccount"

created

string

added in community.hrobot 2.5.0

Creation timestamp in ISO-8601 format.

Returned: success

Sample: "2025-02-22:00:02.000Z"

createtime

string

Timestamp when the sub-account was created.

Note that this is copied from subaccounts[].created in case hetzner_token is specified.

Returned: success

Sample: "2023-08-25T14:23:05Z"

description

string

added in community.hrobot 2.5.0

A user-defined description for the subaccount.

Returned: success

Sample: "host01 backup"

external_reachability

boolean

Status of external reachability.

Note that this is copied from subaccounts[].access_settings.reachable_externally in case hetzner_token is specified.

Returned: success

Sample: false

home_directory

string

added in community.hrobot 2.5.0

Home directory of the subaccount.

Returned: success

Sample: "my_backups/host01.my.company"

homedirectory

string

Homedirectory of the sub-account.

Note that this is copied from subaccounts[].home_directory in case hetzner_token is specified.

Returned: success

Sample: "/home/u2342-sub1"

id

integer

added in community.hrobot 2.5.0

The subaccount’s ID.

Returned: success

Sample: 42

labels

dictionary

added in community.hrobot 2.5.0

User-defined labels for the subaccount.

Returned: success

readonly

boolean

Indicates if the sub-account is in readonly mode.

Note that this is copied from subaccounts[].access_settings.readonly in case hetzner_token is specified.

Returned: success

Sample: false

samba

boolean

Status of Samba support.

Note that this is copied from subaccounts[].access_settings.samba_enabled in case hetzner_token is specified.

Returned: success

Sample: true

server

string

Server on which the sub-account resides.

Returned: success

Sample: "sb1234.your-storagebox.de"

ssh

boolean

Status of SSH support.

Note that this is copied from subaccounts[].access_settings.ssh_enabled in case hetzner_token is specified.

Returned: success

Sample: true

storage_box

integer

added in community.hrobot 2.5.0

The associated storage box’s ID.

Returned: success

Sample: 42

username

string

Username of the sub-account.

Returned: success

Sample: "u2342-sub1"

webdav

boolean

Status of WebDAV support.

Note that this is copied from subaccounts[].access_settings.webdav_enabled in case hetzner_token is specified.

Returned: success

Sample: true

Authors

  • Victor LEFEBVRE (@vic1707)