community.general.memset_zone_domain module – Create and delete domains in Memset DNS zones

Note

This module is part of the community.general collection (version 5.8.3).

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

To use it in a playbook, specify: community.general.memset_zone_domain.

Synopsis

  • Manage DNS zone domains in a Memset account.

Parameters

Parameter

Comments

api_key

string / required

The API key obtained from the Memset control panel.

domain

aliases: name

string / required

The zone domain name. Ensure this value has at most 250 characters.

state

string

Indicates desired state of resource.

Choices:

  • "absent"

  • "present" ← (default)

zone

string / required

The zone to add the domain to (this must already exist).

Notes

Note

  • Zone domains can be thought of as a collection of domains, all of which share the same DNS records (i.e. they point to the same IP). An API key generated via the Memset customer control panel is needed with the following minimum scope - dns.zone_domain_create, dns.zone_domain_delete, dns.zone_domain_list.

  • Currently this module can only create one domain at a time. Multiple domains should be created using with_items.

Examples

# Create the zone domain 'test.com'
- name: Create zone domain
  community.general.memset_zone_domain:
    domain: test.com
    zone: testzone
    state: present
    api_key: 5eb86c9196ab03919abcf03857163741
  delegate_to: localhost

Return Values

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

Key

Description

memset_api

complex

Domain info from the Memset API

Returned: when changed or state == present

domain

string

Domain name

Returned: always

Sample: "example.com"

id

string

Domain ID

Returned: always

Sample: "b0bb1ce851aeea6feeb2dc32fe83bf9c"

Authors

  • Simon Weald (@glitchcrab)