community.hrobot.server_info module – Query information on one or more servers
Note
This module is part of the community.hrobot collection (version 2.0.1).
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 community.hrobot 1.2.0
Synopsis
Query information on one or more servers.
Parameters
Parameter |
Comments |
---|---|
Whether to provide full information for every server. Setting this to When Choices:
|
|
The password for the Robot web-service user. |
|
The username for the Robot web-service user. |
|
Limit result list to servers of this name. |
|
Limit result list to server with this number. |
Attributes
Attribute |
Support |
Description |
---|---|---|
Action group: community.hrobot.robot added in community.hrobot 1.6.0 |
Use |
|
Support: full This action does not modify state. |
Can run in |
|
Support: N/A This action does not modify state. |
Will return details on what has changed (or possibly needs changing in |
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: |
|
The data center the server is located in. Returned: success Sample: |
|
List of assigned single IP addresses. Returned: success Sample: |
|
The date until the server has been paid. Returned: success Sample: |
|
The server product name. Returned: success Sample: |
|
The server’s main IP address. Returned: success Sample: |
|
The server’s main IPv6 network address. Returned: success Sample: |
|
The user-defined server’s name. Returned: success Sample: |
|
The server’s numeric ID. Returned: success Sample: |
|
Server status. Returned: success Can only return:
Sample: |
|
List of assigned subnets. Returned: success Sample: |
|
The first IP in the subnet. Returned: success Sample: |
|
The masks bitlength. Returned: success Sample: |
|
Free traffic quota.
Returned: success Sample: |
|