community.dns.infomaniak_dns_zone_info module – Retrieve zone information in Infomaniak DNS service

Note

This module is part of the community.dns collection (version 4.1.0).

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.infomaniak_dns_zone_info.

New in community.dns 4.1.0

Synopsis

  • Retrieves zone information in Infomaniak DNS service.

Parameters

Parameter

Comments

infomaniak_token

aliases: api_token

string / required

The token for Infomaniak’s DNS API.

zone_name

aliases: zone, zone_id

string / required

The DNS zone to query.

Note that the API does not allow to query by zone ID. Therefore, zone_id is an alias of zone_name for compatibility with modules and plugins for other providers.

Attributes

Attribute

Support

Description

action_group

Action group: community.dns.infomaniak

Use group/community.dns.infomaniak in module_defaults to set defaults for this module.

check_mode

Support: full

This action does not modify state.

Can run in check_mode and return changed status prediction without modifying target.

diff_mode

Support: N/A

This action does not modify state.

Will return details on what has changed (or possibly needs changing in check_mode), when in diff mode.

idempotent

Support: full

This action does not modify state.

When run twice in a row outside check mode, with the same arguments, the second invocation indicates no change.

This assumes that the system controlled/queried by the module has not changed in a relevant way.

Examples

- name: Retrieve details for foo.com zone
  community.dns.infomaniak_dns_zone_info:
    zone: foo.com
    infomaniak_token: access_token
  register: rec

Return Values

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

Key

Description

zone_id

string

The ID of the zone.

Note that Infomaniak’s API does not support accessing by zone ID, whence we use the zone’s name as the “ID” for purposes of the collection’s interface. The actual zone ID can be taken from zone_info.id.

Returned: success

Sample: "foo.com"

zone_info

dictionary

Extra information returned by the API.

Returned: success

dnssec

dictionary

Information on DNSSEC.

Returned: success

Sample: {"is_enabled": true}

is_enabled

boolean

Whether DNSSEC is enabled for the domain.

Returned: success

Sample: true

id

integer

The actual zone ID. See zone_id for more information.

Returned: success

Sample: 1234

nameservers

list / elements=string

List of nameservers the zone should have for using Infomaniak’s DNS.

Returned: success

Sample: ["ns1.infomaniak.com", "ns2.infomaniak.com"]

zone_name

integer

The name of the zone.

Returned: success

Sample: "example.com"

Authors

  • Felix Fontein (@felixfontein)