community.dns.hosttech_dns_zone_info module – Retrieve zone information in Hosttech 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.hosttech_dns_zone_info.

New in version 0.2.0: of community.dns

Synopsis

  • Retrieves zone information in Hosttech DNS service.

Requirements

The below requirements are needed on the host that executes this module.

  • lxml

Parameters

Parameter

Comments

hosttech_password

string

The password for the Hosttech API user.

If provided, hosttech_username must also be provided.

Mutually exclusive with hosttech_token.

hosttech_token

aliases: api_token

string

added in 0.2.0 of community.dns

The password for the Hosttech API user.

Mutually exclusive with hosttech_username and hosttech_password.

Since community.dns 1.2.0, the alias api_token can be used.

hosttech_username

string

The username for the Hosttech API user.

If provided, hosttech_password must also be provided.

Mutually exclusive with hosttech_token.

zone_id

integer

added in 0.2.0 of community.dns

The ID of the DNS zone to query.

Exactly one of zone_name and zone_id must be specified.

zone_name

aliases: zone

string

The DNS zone to query.

Exactly one of zone_name and zone_id must be specified.

Notes

Note

  • Supports check_mode.

Examples

- name: Retrieve details for foo.com zone
  community.dns.hosttech_dns_zone_info:
    zone_name: foo.com
    hosttech_username: foo
    hosttech_password: bar
  register: rec

- name: Retrieve details for zone 23
  community.dns.hosttech_dns_zone_info:
    zone_id: 23
    hosttech_token: access_token

Return Values

Common return values are documented here, the following are the fields unique to this module:

Key

Description

zone_id

integer

The ID of the zone.

Returned: success

Sample: 23

zone_info

dictionary

added in 2.0.0 of community.dns

Extra information returned by the API.

Returned: success

Sample: {“dnssec”: true, “dnssec_email”: “test@example.com”, “ds_records”: [], “email”: “test@example.com”, “ttl”: 3600}

dnssec

boolean

Whether DNSSEC is enabled for the zone or not.

Returned: When hosttech_token has been specified.

dnssec_email

string

The email address contacted when the DNSSEC key is changed.

Is none if DNSSEC is not enabled.

Returned: When hosttech_token has been specified.

ds_records

list / elements=dictionary

The DS records.

See Section 5 of RFC 4034 and Section 2.1 of RFC 4034 for details.

Is none if DNSSEC is not enabled.

Returned: When hosttech_token has been specified.

algorithm

integer

This value is the algorithm number of the DNSKEY RR referred to by the DS record.

A list of values can be found in Appendix A.1 of RFC 4034.

Returned: success

Sample: 8

digest

string

A digest of the DNSKEY RR record this DS record refers to.

Returned: success

Sample: “012356789ABCDEF0123456789ABCDEF012345678”

digest_type

integer

This value identifies the algorithm used to construct the digest.

A list of values can be found in Appendix A.2 of RFC 4034.

Returned: success

Sample: 1

flags

integer

The Zone Key flag. See Section 2.1.1 of RFC 4034 for details.

Returned: success

Sample: 257

key_tag

integer

The Key Tag field lists the key tag of the DNSKEY RR referred to by the DS record.

Returned: success

Sample: 12345

protocol

integer

Must be 3 according to RFC 4034.

Returned: success

Sample: 3

public_key

string

The public key material.

Returned: success

Sample: “MuhdzsQdqEGShwjtJDKZZjdKqUSGluFzTTinpuEeIRzLLcgkwgAPKWFa eQntNlmcNDeCziGwpdvhJnvKXEMbFcZwsaDIJuWqERxAQNGABWfPlCLh HQPnbpRPNKipSdBaUhuOubvFvjBpFAwiwSAapRDVsAgKvjXucfXpFfYb pCundbAXBWhbpHVbqgmGoixXzFSwUsGVYLPpBCiDlLJwzjRKYYaoVYge kMtKFYUVnWIKbectWkDFdVqXwkKigCUDiuTTJxOBRJRNzGiDNMWBjYSm bBCAHMaMYaghLbYTwyKXltdHTHwBwtswGNfpnEdSpKFzZJonBZArQfHD lfceKgmKwEF=”

email

string

The zone’s DNS contact mail in the SOA record.

Returned: success

ttl

integer

The zone’s TTL.

Returned: success

zone_name

integer

The name of the zone.

Returned: success

Sample: “example.com”

Authors

  • Felix Fontein (@felixfontein)