ansible / ansible.builtin / v2.9.25 / module / hcloud_server_info Gather infos about your Hetzner Cloud servers. | "added in version" 2.8 of ansible.builtin" Authors: Lukas Kaemmerling (@LKaemmerling) preview | supported by communityansible.builtin.hcloud_server_info (v2.9.25) — module
pip
Install with pip install ansible==2.9.25
Gather infos about your Hetzner Cloud servers.
This module was called C(hcloud_server_facts) before Ansible 2.9, returning C(ansible_facts) and C(hcloud_server_facts). Note that the M(hcloud_server_info) module no longer returns C(ansible_facts) and the value was renamed to C(hcloud_server_info)!
- name: Gather hcloud server infos hcloud_server_info: register: output
- name: Print the gathered infos debug: var: output.hcloud_server_info
id: description: - The ID of the server you want to get. type: int name: description: - The name of the server you want to get. type: str endpoint: default: https://api.hetzner.cloud/v1 description: - This is the API Endpoint for the Hetzner Cloud. type: str api_token: description: - This is the API Token for the Hetzner Cloud. required: true type: str label_selector: description: - The label selector for the server you want to get. type: str
hcloud_server_info: contains: backup_window: description: Time window (UTC) in which the backup will run, or null if the backups are not enabled returned: always sample: 22-02 type: bool datacenter: description: Name of the datacenter of the server returned: always sample: fsn1-dc14 type: str id: description: Numeric identifier of the server returned: always sample: 1937415 type: int ipv4_address: description: Public IPv4 address of the server returned: always sample: 116.203.104.109 type: str ipv6: description: IPv6 network of the server returned: always sample: 2a01:4f8:1c1c:c140::/64 type: str labels: description: User-defined labels (key-value pairs) returned: always type: dict location: description: Name of the location of the server returned: always sample: fsn1 type: str name: description: Name of the server returned: always sample: my-server type: str rescue_enabled: description: True if rescue mode is enabled, Server will then boot into rescue system on next reboot returned: always sample: false type: bool server_type: description: Name of the server type of the server returned: always sample: cx11 type: str status: description: Status of the server returned: always sample: running type: str description: The server infos as list returned: always type: complex