community.dns.hosttech_dns_zone_info (2.8.3) — module

Retrieve zone information in Hosttech DNS service

| "added in version" 0.2.0 of community.dns"

Authors: Felix Fontein (@felixfontein)

Install collection

Install with ansible-galaxy collection install community.dns:==2.8.3


Add to requirements.yml

  collections:
    - name: community.dns
      version: 2.8.3

Description

Retrieves zone information in Hosttech DNS service.


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- 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
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Retrieve details for zone 23
  community.dns.hosttech_dns_zone_info:
    zone_id: 23
    hosttech_token: access_token

Inputs

    
zone_id:
    description:
    - The ID of the DNS zone to query.
    - Exactly one of O(zone_name) and O(zone_id) must be specified.
    type: int
    version_added: 0.2.0
    version_added_collection: community.dns

zone_name:
    aliases:
    - zone
    description:
    - The DNS zone to query.
    - Exactly one of O(zone_name) and O(zone_id) must be specified.
    type: str

hosttech_token:
    aliases:
    - api_token
    description:
    - The password for the Hosttech API user.
    - Mutually exclusive with O(hosttech_username) and O(hosttech_password).
    - Since community.dns 1.2.0, the alias O(ignore:api_token) can be used.
    type: str
    version_added: 0.2.0
    version_added_collection: community.dns

hosttech_password:
    description:
    - The password for the Hosttech API user.
    - If provided, O(hosttech_username) must also be provided.
    - Mutually exclusive with O(hosttech_token).
    type: str

hosttech_username:
    description:
    - The username for the Hosttech API user.
    - If provided, O(hosttech_password) must also be provided.
    - Mutually exclusive with O(hosttech_token).
    type: str

Outputs

zone_id:
  description: The ID of the zone.
  returned: success
  sample: 23
  type: int
zone_info:
  contains:
    dnssec:
      description:
      - Whether DNSSEC is enabled for the zone or not.
      returned: When O(hosttech_token) has been specified.
      type: bool
    dnssec_email:
      description:
      - The email address contacted when the DNSSEC key is changed.
      - Is V(none) if DNSSEC is not enabled.
      returned: When O(hosttech_token) has been specified.
      type: str
    ds_records:
      contains:
        algorithm:
          description:
          - This value is the algorithm number of the DNSKEY RR referred to by the
            DS record.
          - A list of values can be found in L(Appendix A.1 of RFC 4034,https://datatracker.ietf.org/doc/html/rfc4034#appendix-A.1).
          sample: 8
          type: int
        digest:
          description:
          - A digest of the DNSKEY RR record this DS record refers to.
          sample: 012356789ABCDEF0123456789ABCDEF012345678
          type: str
        digest_type:
          description:
          - This value identifies the algorithm used to construct the digest.
          - A list of values can be found in L(Appendix A.2 of RFC 4034,https://datatracker.ietf.org/doc/html/rfc4034#appendix-A.2).
          sample: 1
          type: int
        flags:
          description:
          - The Zone Key flag. See L(Section 2.1.1 of RFC 4034,https://datatracker.ietf.org/doc/html/rfc4034#section-2.1.1)
            for details.
          sample: 257
          type: int
        key_tag:
          description:
          - The Key Tag field lists the key tag of the DNSKEY RR referred to by the
            DS record.
          sample: 12345
          type: int
        protocol:
          description:
          - Must be 3 according to RFC 4034.
          sample: 3
          type: int
        public_key:
          description:
          - The public key material.
          sample: MuhdzsQdqEGShwjtJDKZZjdKqUSGluFzTTinpuEeIRzLLcgkwgAPKWFa eQntNlmcNDeCziGwpdvhJnvKXEMbFcZwsaDIJuWqERxAQNGABWfPlCLh
            HQPnbpRPNKipSdBaUhuOubvFvjBpFAwiwSAapRDVsAgKvjXucfXpFfYb pCundbAXBWhbpHVbqgmGoixXzFSwUsGVYLPpBCiDlLJwzjRKYYaoVYge
            kMtKFYUVnWIKbectWkDFdVqXwkKigCUDiuTTJxOBRJRNzGiDNMWBjYSm bBCAHMaMYaghLbYTwyKXltdHTHwBwtswGNfpnEdSpKFzZJonBZArQfHD
            lfceKgmKwEF=
          type: str
      description:
      - The DS records.
      - See L(Section 5 of RFC 4034,https://datatracker.ietf.org/doc/html/rfc4034#section-5)
        and L(Section 2.1 of RFC 4034,https://datatracker.ietf.org/doc/html/rfc4034#section-2.1)
        for details.
      - Is V(none) if DNSSEC is not enabled.
      elements: dict
      returned: When O(hosttech_token) has been specified.
      type: list
    email:
      description:
      - The zone's DNS contact mail in the SOA record.
      type: str
    ttl:
      description:
      - The zone's TTL.
      type: int
  description:
  - Extra information returned by the API.
  returned: success
  sample:
    dnssec: true
    dnssec_email: test@example.com
    ds_records: []
    email: test@example.com
    ttl: 3600
  type: dict
  version_added: 2.0.0
  version_added_collection: community.dns
zone_name:
  description: The name of the zone.
  returned: success
  sample: example.com
  type: int