community.dns.hetzner_dns_zone_info module – Retrieve zone information in Hetzner DNS service
Note
This module is part of the community.dns collection (version 2.2.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.dns
.
To use it in a playbook, specify: community.dns.hetzner_dns_zone_info
.
New in version 2.0.0: of community.dns
Parameters
Parameter |
Comments |
---|---|
The token for the Hetzner API. If not provided, will be read from the environment variable |
|
The ID of the DNS zone to query. Exactly one of zone_name and zone_id must be specified. |
|
The DNS zone to query. Exactly one of zone_name and zone_id must be specified. |
Examples
- name: Retrieve details for foo.com zone
community.dns.hetzner_dns_zone_info:
zone: foo.com
hetzner_token: access_token
register: rec
- name: Retrieve details for zone 23
community.dns.hetzner_dns_zone_info:
zone_id: 23
hetzner_token: access_token
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
The ID of the zone. Returned: success Sample: 23 |
|
Extra information returned by the API. Returned: success |
|
The time when the zone was created. Returned: success Sample: “2021-07-15T19:23:58Z” |
|
Indicates whether the zone is a secondary DNS zone. Returned: success Sample: true |
|
Unknown. Returned: success |
|
List of nameservers during import. Returned: success |
|
The time the zone was last modified. Returned: success Sample: “2021-07-15T19:23:58Z” |
|
List of nameservers the zone should have for using Hetzner’s DNS. Returned: success |
|
Owner of the zone. Returned: success |
|
Unknown. Returned: success Sample: true |
|
Zone’s permissions. Returned: success |
|
Unknown. Returned: success |
|
Number of records associated to this zone. Returned: success Sample: 0 |
|
Unknown. Returned: success |
|
Status of the zone. Can be one of Returned: success Sample: “verified” |
|
TTL of zone. Returned: success Sample: 0 |
|
Shape of the TXT record that has to be set to verify a zone. If name and token are empty, no TXT record needs to be set. Returned: success Sample: {“name”: “”, “token”: “”} |
|
The TXT record’s name. Returned: success |
|
The TXT record’s content. Returned: success |
|
Time when zone was verified. Returned: success Sample: “2021-07-15T19:23:58Z” |
|
The name of the zone. Returned: success Sample: “example.com” |
Authors
Markus Bergholz (@markuman)
Felix Fontein (@felixfontein)
Collection links
Issue Tracker Repository (Sources) Submit a bug report Request a feature Communication