hetzner.hcloud.zone_info module – Gather infos about your Hetzner Cloud Zones.
Note
This module is part of the hetzner.hcloud collection (version 6.9.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 hetzner.hcloud. You need further requirements to be able to use this module, see Requirements for details.
To use it in a playbook, specify: hetzner.hcloud.zone_info.
Synopsis
- Gather infos about your Hetzner Cloud Zones.
- See the Zones API documentation for more details.
Aliases: hcloud_zone_info
Requirements
The below requirements are needed on the host that executes this module.
- python-dateutil >= 2.7.5
- requests >=2.20
Parameters
Parameter | Comments |
|---|---|
api_endpoint aliases: endpoint string | The endpoint for the Hetzner Cloud API. You can also set this option by using the Default: |
api_endpoint_hetzner string | The endpoint for the Hetzner API. You can also set this option by using the Default: |
api_token string / required | The token for the Hetzner Cloud API. You can also set this option by using the |
id integer | ID of the Zone you want to get. The module will fail if the provided ID is invalid. |
label_selector string | Label selector to filter the Zones you want to get. |
name string | Name of the Zone you want to get. |
See Also
See also
- Documentation for Hetzner APIs
-
Complete reference for the Hetzner APIs.
Examples
- name: Gather Zone infos
hetzner.hcloud.zone_info:
register: output
- name: Print the gathered infos
debug:
var: output.hcloud_zone_info
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key | Description |
|---|---|
hcloud_zone_info list / elements=dictionary | Zone infos as list. Returned: always |
|
authoritative_nameservers dictionary |
Authoritative nameservers of the Zone. Returned: always |
|
assigned list / elements=string |
Authoritative Hetzner nameservers assigned to the Zone. Returned: always Sample: |
|
delegated list / elements=string |
Authoritative nameservers delegated to the parent DNS zone. Returned: always Sample: |
|
delegation_last_check string |
Point in time when the DNS zone delegation was last checked (in ISO-8601 format). Returned: always Sample: |
|
delegation_status string |
Status of the delegation. Returned: always Sample: |
|
delete_protection boolean |
Protect the Zone from deletion. Returned: always Sample: |
|
id integer |
ID of the Zone. Returned: always Sample: |
|
labels dictionary |
User-defined labels (key-value pairs) Returned: always Sample: |
|
mode string |
Mode of the Zone. Returned: always Sample: |
|
name string |
Name of the Zone. Returned: always Sample: |
|
primary_nameservers list / elements=dictionary |
Primary nameservers of the Zone. Returned: always |
|
address string |
Public IPv4 or IPv6 address of the primary nameserver. Returned: always Sample: |
|
port integer |
Port of the primary nameserver. Returned: always Sample: |
|
tsig_algorithm string |
Transaction signature (TSIG) algorithm used to generate the TSIG key. Returned: always Sample: |
|
tsig_key string |
Transaction signature (TSIG) key. Returned: always |
|
record_count integer |
Number of Resource Records (RR) within the Zone. Returned: always Sample: |
|
registrar string |
Registrar of the Zone. Returned: always Sample: |
|
status string |
Status of the Zone. Returned: always Sample: |
|
ttl integer |
TTL of the Zone. Returned: always Sample: |
Collection links
© 2012–2018 Michael DeHaan
© 2018–2025 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/projects/ansible/latest/collections/hetzner/hcloud/zone_info_module.html