community.dns.hetzner_dns_records (2.8.3) — inventory

Create inventory from Hetzner DNS records

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

Authors: Markus Bergholz (@markuman) <markuman+spambelongstogoogle@gmail.com>, 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

For Ansible to be able to identify a YAML file as an inventory for this plugin, the inventory file must contain C(plugin: community.dns.hetzner_dns_records) and its filename must end with C(hetzner_dns.yaml) or C(hetzner_dns.yml)

Records are matched by prefix / record name and value.

This plugin allows to create an inventory from Hetzner DNS records.

Inputs

    
plugin:
    choices:
    - community.dns.hetzner_dns_records
    description: The name of this plugin. Should always be set to V(community.dns.hetzner_dns_records)
      for this plugin to recognize it as its own.
    type: str

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

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

hetzner_token:
    aliases:
    - api_token
    description:
    - The token for the Hetzner API.
    - If not provided, will be read from the environment variable E(HETZNER_DNS_TOKEN).
    env:
    - name: HETZNER_DNS_TOKEN
    required: true
    type: str

simple_filters:
    aliases:
    - filters
    default: {}
    description:
    - A dictionary of filter value pairs.
    - This option has been renamed from O(filters) to O(simple_filters) in community.dns
      2.8.0. The old name can still be used until community.dns 3.0.0.
    suboptions:
      type:
        choices:
        - A
        - AAAA
        - CAA
        - CNAME
        - DANE
        - DS
        - HINFO
        - MX
        - NS
        - RP
        - SOA
        - SRV
        - TLSA
        - TXT
        default:
        - A
        - AAAA
        - CNAME
        description:
        - Record types whose values to use.
        elements: string
        type: list
    type: dict

txt_transformation:
    choices:
    - api
    - quoted
    - unquoted
    default: unquoted
    description:
    - Determines how TXT entry values are converted between the API and this module's
      input and output.
    - The value V(api) means that values are returned from this module as they are returned
      from the API, and pushed to the API as they have been passed to this module. For
      idempotency checks, the input string will be compared to the strings returned by
      the API. The API might automatically transform some values, like splitting long
      values or adding quotes, which can cause problems with idempotency.
    - The value V(unquoted) automatically transforms values so that you can pass in unquoted
      values, and the module will return unquoted values. If you pass in quoted values,
      they will be double-quoted.
    - The value V(quoted) automatically transforms values so that you must use quoting
      for values that contain spaces, characters such as quotation marks and backslashes,
      and that are longer than 255 bytes. It also makes sure to return values from the
      API in a normalized encoding.
    - The default value, V(unquoted), ensures that you can work with values without having
      to care about how to correctly quote for DNS. Most users should use one of V(unquoted)
      or V(quoted), but not V(api).
    - B(Note:) the conversion code assumes UTF-8 encoding for values. If you need another
      encoding use O(txt_transformation=api) and handle the encoding yourself.
    type: str

txt_character_encoding:
    choices:
    - decimal
    - octal
    description:
    - Whether to treat numeric escape sequences (V(\\xyz)) as octal or decimal numbers.
      This is only used when O(txt_transformation=quoted).
    - The current default is V(octal) which is deprecated. It will change to V(decimal)
      in community.dns 3.0.0. The value V(decimal) is compatible to L(RFC 1035, https://www.ietf.org/rfc/rfc1035.txt).
    type: str
    version_added: 2.5.0
    version_added_collection: community.dns

See also