Documentation

dnsmadeeasy - Interface with dnsmadeeasy.com (a DNS hosting service).

New in version 1.3.

Synopsis

Manages DNS records via the v2 REST API of the DNS Made Easy service. It handles records only; there is no manipulation of domains or monitor/account support yet. See: http://www.dnsmadeeasy.com/services/rest-api/

Requirements (on host that executes module)

  • hashlib
  • hmac

Options

parameter required default choices comments
account_key
yes
    Accout API Key.
    account_secret
    yes
      Accout Secret Key.
      domain
      yes
        Domain to work with. Can be the domain name (e.g. "mydomain.com") or the numeric ID of the domain in DNS Made Easy (e.g. "839989") for faster resolution.
        record_name
        no
          Record name to get/create/delete/update. If record_name is not specified; all records for the domain will be returned in "result" regardless of the state argument.
          record_ttl
          no 1800
            record's "Time to live". Number of seconds the record remains cached in DNS servers.
            record_type
            no
            • A
            • AAAA
            • CNAME
            • HTTPRED
            • MX
            • NS
            • PTR
            • SRV
            • TXT
            Record type.
            record_value
            no
              Record value. HTTPRED: <redirection URL>, MX: <priority> <target name>, NS: <name server>, PTR: <target name>, SRV: <priority> <weight> <port> <target name>, TXT: <text value>
              If record_value is not specified; no changes will be made and the record will be returned in 'result' (in other words, this module can be used to fetch a record's current id, type, and ttl)
              state
              yes
              • present
              • absent
              whether the record should exist or not
              validate_certs
              (added in 1.5.1)
              no yes
              • yes
              • no
              If no, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates.

              Examples

              # fetch my.com domain records
              - dnsmadeeasy: account_key=key account_secret=secret domain=my.com state=present
                register: response
              
              # create / ensure the presence of a record
              - dnsmadeeasy: account_key=key account_secret=secret domain=my.com state=present record_name="test" record_type="A" record_value="127.0.0.1"
              
              # update the previously created record
              - dnsmadeeasy: account_key=key account_secret=secret domain=my.com state=present record_name="test" record_value="192.168.0.1"
              
              # fetch a specific record
              - dnsmadeeasy: account_key=key account_secret=secret domain=my.com state=present record_name="test"
                register: response
              
              # delete a record / ensure it is absent
              - dnsmadeeasy: account_key=key account_secret=secret domain=my.com state=absent record_name="test"
              

              Notes

              Note

              The DNS Made Easy service requires that machines interacting with the API have the proper time and timezone set. Be sure you are within a few seconds of actual time by using NTP.

              Note

              This module returns record(s) in the “result” element when ‘state’ is set to ‘present’. This value can be be registered and used in your playbooks.

              This is an Extras Module

              For more information on what this means please read Extras Modules

              For help in developing on modules, should you be so inclined, please read Community Information & Contributing, Helping Testing PRs and Developing Modules.