ansible.builtin.exo_dns_record (v2.3.3.0-1) — module

Manages DNS records on Exoscale DNS.

| "added in version" 2.2 of ansible.builtin"

Authors: René Moser (@resmo)

preview | supported by community

Install Ansible via pip

Install with pip install ansible==2.3.3.0.post1

Description

Create, update and delete records.


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# Create or update an A record.
- local_action:
    module: exo_dns_record
    name: web-vm-1
    domain: example.com
    content: 1.2.3.4
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# Update an existing A record with a new IP.
- local_action:
    module: exo_dns_record
    name: web-vm-1
    domain: example.com
    content: 1.2.3.5
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# Create another A record with same name.
- local_action:
    module: exo_dns_record
    name: web-vm-1
    domain: example.com
    content: 1.2.3.6
    multiple: yes
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# Create or update a CNAME record.
- local_action:
    module: exo_dns_record
    name: www
    domain: example.com
    record_type: CNAME
    content: web-vm-1
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# Create or update a MX record.
- local_action:
    module: exo_dns_record
    domain: example.com
    record_type: MX
    content: mx1.example.com
    prio: 10
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# delete a MX record.
- local_action:
    module: exo_dns_record
    domain: example.com
    record_type: MX
    content: mx1.example.com
    state: absent
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# Remove a record.
- local_action:
    module: exo_dns_record
    name: www
    domain: example.com
    state: absent

Inputs

    
ttl:
    default: 3600
    description:
    - TTL of the record in seconds.
    required: false

name:
    default: ''
    description:
    - Name of the record.
    required: false

prio:
    aliases:
    - priority
    default: null
    description:
    - Priority of the record.
    required: false

state:
    choices:
    - present
    - absent
    default: present
    description:
    - State of the record.
    required: false

domain:
    description:
    - Domain the record is related to.
    required: true

api_key:
    default: null
    description:
    - API key of the Exoscale DNS API.
    required: false

content:
    aliases:
    - value
    - address
    default: null
    description:
    - Content of the record.
    - Required if C(state=present) or C(name="")
    required: false

multiple:
    aliases:
    - priority
    default: null
    description:
    - Whether there are more than one records with similar C(name).
    - Only allowed with C(record_type=A).
    - C(content) will not be updated as it is used as key to find the record.
    required: false

api_region:
    default: cloudstack
    description:
    - Name of the ini section in the C(cloustack.ini) file.
    required: false

api_secret:
    default: null
    description:
    - Secret key of the Exoscale DNS API.
    required: false

api_timeout:
    default: 10
    description:
    - HTTP timeout to Exoscale DNS API.
    required: false

record_type:
    aliases:
    - rtype
    - type
    choices:
    - A
    - ALIAS
    - CNAME
    - MX
    - SPF
    - URL
    - TXT
    - NS
    - SRV
    - NAPTR
    - PTR
    - AAAA
    - SSHFP
    - HINFO
    - POOL
    default: A
    description:
    - Type of the record.
    required: false

validate_certs:
    default: true
    description:
    - Validate SSL certs of the Exoscale DNS API.
    required: false

Outputs

exo_dns_record:
  contains:
    content:
      description: value of the record
      returned: success
      sample: 1.2.3.4
      type: string
    created_at:
      description: When the record was created
      returned: success
      sample: '2016-08-12T15:24:23.989Z'
      type: string
    domain:
      description: Name of the domain
      returned: success
      sample: example.com
      type: string
    domain_id:
      description: ID of the domain
      returned: success
      sample: 254324
      type: int
    id:
      description: ID of the record
      returned: success
      sample: 254324
      type: int
    name:
      description: name of the record
      returned: success
      sample: www
      type: string
    parent_id:
      description: ID of the parent
      returned: success
      sample: null
      type: int
    prio:
      description: Priority of the record
      returned: success
      sample: 10
      type: int
    record_type:
      description: Priority of the record
      returned: success
      sample: A
      type: string
    system_record:
      description: Whether the record is a system record or not
      returned: success
      sample: false
      type: bool
    ttl:
      description: Time to live of the record
      returned: success
      sample: 3600
      type: int
    updated_at:
      description: When the record was updated
      returned: success
      sample: '2016-08-12T15:24:23.989Z'
      type: string
  description: API record results
  returned: success
  type: complex