community.hrobot.server module – Update server information

Note

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

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

New in community.hrobot 1.2.0

Synopsis

  • Allows to update server information.

  • Right now the API only supports updating the server’s name.

Parameters

Parameter

Comments

hetzner_password

string / required

The password for the Robot webservice user.

hetzner_user

string / required

The username for the Robot webservice user.

server_name

string

The server’s name.

If this option is not provided, it will not be adjusted.

server_number

integer / required

The server number of the server to update.

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: none

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

Examples

- name: Set server's name to foo.example.com
  community.hrobot.server:
    hetzner_user: foo
    hetzner_password: bar
    server_number: 123
    server_name: foo.example.com

Return Values

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

Key

Description

server

dictionary

Information on the server.

Returned: success

cancelled

boolean

Whether the server is cancelled.

Returned: success

Sample: false

cpanel

boolean

Flag of cPanel installation availability.

Returned: success

Sample: true

dc

string

The data center the server is located in.

Returned: success

Sample: "NBG1-DC1"

hot_swap

boolean

Flag of Hot Swap availability.

Returned: success

Sample: true

ip

list / elements=string

List of assigned single IP addresses.

Returned: success

Sample: ["123.123.123.123"]

linked_storagebox

integer

Linked Storage Box ID.

Returned: success

Sample: 12345

paid_until

string

The date until the server has been paid.

Returned: success

Sample: "2018-08-04"

plesk

boolean

Flag of Plesk installation availability.

Returned: success

Sample: true

product

string

The server product name.

Returned: success

Sample: "EQ 8"

rescue

boolean

Whether the rescue system is available.

Returned: success

Sample: false

reset

boolean

Whether the server can be automatically reset.

Returned: success

Sample: true

server_ip

string

The server’s main IP address.

Returned: success

Sample: "123.123.123.123"

server_ipv6_net

string

The server’s main IPv6 network address.

Returned: success

Sample: "2a01:f48:111:4221::"

server_name

string

The user-defined server’s name.

Returned: success

Sample: "server1"

server_number

integer

The server’s numeric ID.

Returned: success

Sample: 321

status

string

Server status.

Returned: success

Can only return:

  • "ready"

  • "in process"

Sample: "ready"

subnet

list / elements=dictionary

List of assigned subnets.

Returned: success

Sample: [{"ip": "2a01:4f8:111:4221::", "mask": 64}]

ip

string

The first IP in the subnet.

Returned: success

Sample: "2a01:4f8:111:4221::"

mask

string

The masks bitlength.

Returned: success

Sample: "64"

traffic

string

Free traffic quota.

unlimited in case of unlimited traffic.

Returned: success

Sample: "5 TB"

vnc

boolean

Flag of VNC installation availability.

Returned: success

Sample: true

windows

boolean

Flag of Windows installation availability.

Returned: success

Sample: true

wol

boolean

Flag of Wake On Lan availability.

Returned: success

Sample: true

Authors

  • Felix Fontein (@felixfontein)