community.general.memset_zone (8.5.0) — module

Creates and deletes Memset DNS zones

Authors: Simon Weald (@glitchcrab)

Install collection

Install with ansible-galaxy collection install community.general:==8.5.0


Add to requirements.yml

  collections:
    - name: community.general
      version: 8.5.0

Description

Manage DNS zones in a Memset account.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# Create the zone 'test'
- name: Create zone
  community.general.memset_zone:
    name: test
    state: present
    api_key: 5eb86c9196ab03919abcf03857163741
    ttl: 300
  delegate_to: localhost
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# Force zone deletion
- name: Force delete zone
  community.general.memset_zone:
    name: test
    state: absent
    api_key: 5eb86c9196ab03919abcf03857163741
    force: true
  delegate_to: localhost

Inputs

    
ttl:
    choices:
    - 0
    - 300
    - 600
    - 900
    - 1800
    - 3600
    - 7200
    - 10800
    - 21600
    - 43200
    - 86400
    default: 0
    description:
    - The default TTL for all records created in the zone. This must be a valid int from
      U(https://www.memset.com/apidocs/methods_dns.html#dns.zone_create).
    type: int

name:
    aliases:
    - nickname
    description:
    - The zone nickname; usually the same as the main domain. Ensure this value has at
      most 250 characters.
    required: true
    type: str

force:
    default: false
    description:
    - Forces deletion of a zone and all zone domains/zone records it contains.
    required: false
    type: bool

state:
    choices:
    - absent
    - present
    description:
    - Indicates desired state of resource.
    required: true
    type: str

api_key:
    description:
    - The API key obtained from the Memset control panel.
    required: true
    type: str

Outputs

memset_api:
  contains:
    domains:
      description: List of domains in this zone
      returned: always
      sample: []
      type: list
    id:
      description: Zone id
      returned: always
      sample: b0bb1ce851aeea6feeb2dc32fe83bf9c
      type: str
    nickname:
      description: Zone name
      returned: always
      sample: example.com
      type: str
    records:
      description: List of DNS records for domains in this zone
      returned: always
      sample: []
      type: list
    ttl:
      description: Default TTL for domains in this zone
      returned: always
      sample: 300
      type: int
  description: Zone info from the Memset API
  returned: when state == present
  type: complex