rax_dns_record – Manage DNS records on Rackspace Cloud DNS¶
Requirements¶
The below requirements are needed on the host that executes this module.
pyrax
python >= 2.6
Parameters¶
Notes¶
Note
It is recommended that plays utilizing this module be run with
serial: 1to avoid exceeding the API request limit imposed by the Rackspace CloudDNS APITo manipulate a
PTRrecord eitherloadbalancerorservermust be suppliedAs of version 1.7, the
typefield is required and no longer defaults to anArecord.PTRrecord support was added in version 1.7The following environment variables can be used,
RAX_USERNAME,RAX_API_KEY,RAX_CREDS_FILE,RAX_CREDENTIALS,RAX_REGION.RAX_CREDENTIALSandRAX_CREDS_FILEpoints to a credentials file appropriate for pyrax. See https://github.com/rackspace/pyrax/blob/master/docs/getting_started.md#authenticatingRAX_USERNAMEandRAX_API_KEYobviate the use of a credentials fileRAX_REGIONdefines a Rackspace Public Cloud region (DFW, ORD, LON, …)The following environment variables can be used,
RAX_USERNAME,RAX_API_KEY,RAX_CREDS_FILE,RAX_CREDENTIALS,RAX_REGION.RAX_CREDENTIALSandRAX_CREDS_FILEpoints to a credentials file appropriate for pyrax. See https://github.com/rackspace/pyrax/blob/master/docs/getting_started.md#authenticatingRAX_USERNAMEandRAX_API_KEYobviate the use of a credentials fileRAX_REGIONdefines a Rackspace Public Cloud region (DFW, ORD, LON, …)
Examples¶
- name: Create DNS Records
hosts: all
gather_facts: False
tasks:
- name: Create A record
local_action:
module: rax_dns_record
credentials: ~/.raxpub
domain: example.org
name: www.example.org
data: "{{ rax_accessipv4 }}"
type: A
register: a_record
- name: Create PTR record
local_action:
module: rax_dns_record
credentials: ~/.raxpub
server: "{{ rax_id }}"
name: "{{ inventory_hostname }}"
region: DFW
register: ptr_record
Status¶
This module is not guaranteed to have a backwards compatible interface. [preview]
This module is maintained by the Ansible Community. [community]
Authors¶
Matt Martz (@sivel)
Hint
If you notice any issues in this documentation, you can edit this document to improve it.