community.hrobot.storagebox_snapshot_plan module – Modify a storage box’s snapshot plans

Note

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

New in community.hrobot 2.1.0

Synopsis

  • Enable, modify, and disable the snapshot plans of 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.

plans

list / elements=dictionary / required

The storage plan configurations.

Note that right now there must be exactly one element.

All date and time parameters are in UTC.

day_of_month

integer

The day of month of execution of the plan. 1 is the 1st day of the month.

If set to null or omitted, the plan is run every day of a month, unless there are other restrictions.

day_of_week

integer

The day of the week of execution of the plan. 1 is Monday, 7 is Sunday.

If set to null or omitted, the plan is run every day of a week, unless there are other restrictions.

hour

integer

The hour of execution of the plan.

Required if plans[].status=enabled.

max_snapshots

integer

The maximum number of automatic snapshots of this plan.

Required if plans[].status=enabled.

minute

integer

The minute of execution of the plan.

Required if plans[].status=enabled.

month

integer

The month of execution of the plan. 1 is January, 12 is December.

If set to null or omitted, the plan is run every month.

status

string / required

The status of the snapshot plan.

Choices:

  • "enabled"

  • "disabled"

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 modify.

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

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

diff_mode

Support: full

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

idempotent

Support: full

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: Setup storagebox
  community.hrobot.storagebox_snapshot_plan:
    hetzner_user: foo
    hetzner_password: bar
    storagebox_id: 123
    plans:
      - status: enabled
        minute: 5
        hour: 12
        day_of_week: 2  # Tuesday
        max_snapshots: 2

Return Values

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

Key

Description

plans

list / elements=dictionary

The storage box’s snapshot plan configurations.

All date and time parameters are in UTC.

Returned: success

day_of_month

integer

The day of month of execution of the plan. 1 is the 1st day of the month.

If set to null, the plan is run every day of a month, unless there are other restrictions.

Returned: success

day_of_week

integer

The day of the week of execution of the plan. 1 is Monday, 7 is Sunday.

If set to null, the plan is run every day of a week, unless there are other restrictions.

Returned: success

Sample: 2

hour

integer

The hour of execution of the plan.

Returned: success

Sample: 12

max_snapshots

integer

The maximum number of automatic snapshots of this plan.

Returned: success

Sample: 2

minute

integer

The minute of execution of the plan.

Returned: success

Sample: 5

month

integer

The month of execution of the plan. 1 is January, 12 is December.

If set to null, the plan is run every month.

Returned: success

status

string

The status of the snapshot plan.

Returned: success

Can only return:

  • "enabled"

  • "disabled"

Sample: "enabled"

Authors

  • Felix Fontein (@felixfontein)