community.hrobot.failover_ip module – Manage Hetzner’s failover IPs

Note

This module is part of the community.hrobot collection (version 2.0.2).

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

Synopsis

  • Manage Hetzner’s failover IPs.

Parameters

Parameter

Comments

failover_ip

string / required

The failover IP address.

hetzner_password

string / required

The password for the Robot web-service user.

hetzner_user

string / required

The username for the Robot web-service user.

state

string

Defines whether the IP will be routed or not.

If set to routed, value must be specified.

Choices:

  • "routed" ← (default)

  • "unrouted"

timeout

integer

Timeout to use when routing or unrouting the failover IP.

Note that the API call returns when the failover IP has been successfully routed to the new address, respectively successfully unrouted.

Default: 180

value

string

The new value for the failover IP address.

Required when setting state to routed.

Attributes

Attribute

Support

Description

action_group

Action group: community.hrobot.robot

added in community.hrobot 1.6.0

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.

See Also

See also

Failover IP documentation

Hetzner’s documentation on failover IPs.

community.hrobot.failover_ip_info

Retrieve information on failover IPs.

Examples

- name: Set value of failover IP 1.2.3.4 to 5.6.7.8
  community.hrobot.failover_ip:
    hetzner_user: foo
    hetzner_password: bar
    failover_ip: 1.2.3.4
    value: 5.6.7.8

- name: Set value of failover IP 1.2.3.4 to unrouted
  community.hrobot.failover_ip:
    hetzner_user: foo
    hetzner_password: bar
    failover_ip: 1.2.3.4
    state: unrouted

Return Values

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

Key

Description

state

string

Will be routed or unrouted.

Returned: success

value

string

The value of the failover IP.

Will be none if the IP is unrouted.

Returned: success

Authors

  • Felix Fontein (@felixfontein)