rax_dns_record - Manage DNS records on Rackspace Cloud DNS

Author:Matt Martz

Synopsis

New in version 1.5.

Manage DNS records on Rackspace Cloud DNS

Options

parameter required default choices comments
api_key no
    Rackspace API key (overrides credentials)
    comment no
      Brief description of the domain. Maximum length of 160 characters
      credentials no
        File to find the Rackspace credentials in (ignored if api_key and username are provided)
        data yes
          IP address for A/AAAA record, FQDN for CNAME/MX/NS, or text data for SRV/TXT
          domain yes
            Domain name to create the record in
            name yes
              FQDN record name to create
              priority no
                Required for MX and SRV records, but forbidden for other record types. If specified, must be an integer from 0 to 65535.
                state no present
                • present
                • absent
                Indicate desired state of the resource
                ttl no 3600
                  Time to live of domain in seconds
                  type no A
                  • A
                  • AAAA
                  • CNAME
                  • MX
                  • NS
                  • SRV
                  • TXT
                  DNS record type
                  username no
                    Rackspace username (overrides credentials)

                    Note

                    Requires pyrax

                    Examples


                    - name: Create record
                      hosts: all
                      gather_facts: False
                      tasks:
                        - name: Record create request
                          local_action:
                            module: rax_dns_record
                            credentials: ~/.raxpub
                            domain: example.org
                            name: www.example.org
                            data: 127.0.0.1
                            type: A
                          register: rax_dns_record
                    

                    Note

                    The following environment variables can be used, RAX_USERNAME, RAX_API_KEY, RAX_CREDS_FILE, RAX_CREDENTIALS, RAX_REGION.

                    Note

                    RAX_CREDENTIALS and RAX_CREDS_FILE points to a credentials file appropriate for pyrax. See https://github.com/rackspace/pyrax/blob/master/docs/getting_started.md#authenticating

                    Note

                    RAX_USERNAME and RAX_API_KEY obviate the use of a credentials file

                    Note

                    RAX_REGION defines a Rackspace Public Cloud region (DFW, ORD, LON, ...)