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

Author:Alex Coomans

Synopsis

New in version 1.6.

Manages domains and records via the DNSimple API, see the docs: http://developer.dnsimple.com/

Options

parameter required default choices comments
account_api_token no
    Account API token. See account_email for info.
    account_email no
      Account email. If ommitted, the env variables DNSIMPLE_EMAIL and DNSIMPLE_API_TOKEN will be looked for. If those aren't found, a .dnsimple file will be looked for, see: https://github.com/mikemaccana/dnsimple-python#getting-started
      domain no
        Domain to work with. Can be the domain name (e.g. "mydomain.com") or the numeric ID of the domain in DNSimple. If ommitted, a list of domains will be returned.If domain is present but the domain doesn't exist, it will be created.
        priority no
          Record priority
          record no
            Record to add, if blank a record for the domain will be created, supports the wildcard (*)
            record_ids no
              List of records to ensure they either exist or don't exist
              solo no
                Whether the record should be the only one for that record type and record name. Only use with state=present on a record
                state no
                • present
                • absent
                whether the record should exist or not
                ttl no 3600 (one hour)
                  The TTL to give the new record
                  type no
                  • A
                  • ALIAS
                  • CNAME
                  • MX
                  • SPF
                  • URL
                  • TXT
                  • NS
                  • SRV
                  • NAPTR
                  • PTR
                  • AAAA
                  • SSHFP
                  • HINFO
                  • POOL
                  The type of DNS record to create
                  value no
                    Record valueMust be specified when trying to ensure a record exists

                    Note

                    Requires dnsimple

                    Examples


                    # authenicate using email and API token
                    - local_action: dnsimple account_email=test@example.com account_api_token=dummyapitoken
                    
                    # fetch all domains
                    - local_action dnsimple
                      register: domains
                    
                    # fetch my.com domain records
                    - local_action: dnsimple domain=my.com state=present
                      register: records
                    
                    # delete a domain
                    - local_action: dnsimple domain=my.com state=absent
                    
                    # create a test.my.com A record to point to 127.0.0.01
                    - local_action: dnsimple domain=my.com record=test type=A value=127.0.0.1
                      register: record
                    
                    # and then delete it
                    - local_action: dnsimple domain=my.com record_ids={{ record['id'] }}
                    
                    # create a my.com CNAME record to example.com
                    - local_action: dnsimple domain=my.com record= type=CNAME value=example.com state=present
                    
                    # change it's ttl
                    - local_action: dnsimple domain=my.com record= type=CNAME value=example.com ttl=600 state=present
                    
                    # and delete the record
                    - local_action: dnsimpledomain=my.com record= type=CNAME value=example.com state=absent