community.hrobot.server_info module – Query information on one or more servers
Note
This module is part of the community.hrobot collection (version 1.4.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.server_info
.
New in version 1.2.0: of community.hrobot
Parameters
Parameter |
Comments |
---|---|
Whether to provide full information for every server. Setting this to When server_number is specified, this option is set to Choices:
|
|
The password for the Robot webservice user. |
|
The username for the Robot webservice user. |
|
Limit result list to servers of this name. |
|
Limit result list to server with this number. |
Examples
- name: Query a list of all servers
community.hrobot.server_info:
hetzner_user: foo
hetzner_password: bar
register: result
- name: Query a specific server
community.hrobot.server_info:
hetzner_user: foo
hetzner_password: bar
server_number: 23
register: result
- name: Output data on specific server
ansible.builtin.debug:
msg: "Server name: {{ result.servers[0].server_name }}"
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
List of servers matching the provided options. Returned: success |
|
Whether the server is cancelled. Returned: success Sample: false |
|
Flag of cPanel installation availability. Returned: when full_info=true Sample: true |
|
The data center the server is located in. Returned: success Sample: “NBG1-DC1” |
|
Flag of Hot Swap availability. Returned: when full_info=true Sample: true |
|
List of assigned single IP addresses. Returned: success Sample: [“123.123.123.123”] |
|
Linked Storage Box ID. Returned: when full_info=true Sample: 12345 |
|
The date until the server has been paid. Returned: success Sample: “2018-08-04” |
|
Flag of Plesk installation availability. Returned: when full_info=true Sample: true |
|
The server product name. Returned: success Sample: “EQ 8” |
|
Whether the rescue system is available. Returned: when full_info=true Sample: false |
|
Whether the server can be automatically reset. Returned: when full_info=true Sample: true |
|
The server’s main IP address. Returned: success Sample: “123.123.123.123” |
|
The server’s main IPv6 network address. Returned: success Sample: “2a01:f48:111:4221::” |
|
The user-defined server’s name. Returned: success Sample: “server1” |
|
The server’s numeric ID. Returned: success Sample: 321 |
|
Server status. Returned: success Can only return:
Sample: “ready” |
|
List of assigned subnets. Returned: success Sample: [{“ip”: “2a01:4f8:111:4221::”, “mask”: 64}] |
|
The first IP in the subnet. Returned: success Sample: “2a01:4f8:111:4221::” |
|
The masks bitlength. Returned: success Sample: “64” |
|
Free traffic quota.
Returned: success Sample: “5 TB” |
|
Flag of VNC installation availability. Returned: when full_info=true Sample: true |
|
Flag of Windows installation availability. Returned: when full_info=true Sample: true |
|
Flag of Wake On Lan availability. Returned: when full_info=true Sample: true |
Authors
Felix Fontein (@felixfontein)
Collection links
Issue Tracker Repository (Sources) Submit a bug report Request a feature Communication