ansible/ansible — pull request #7504 by sivel (2014-05-22 20:23:27+00:00)
Title: New module: rax_dns_ptr

This module is designed for creating reverse DNS records (PTR records).

Sample play:

```
---
- hosts: localhost
gather_facts: False
tasks:
- name: Create server
local_action:
module: rax
credentials: ~/.raxpub
name: ptr.example.org
flavor: performance1-1
image: ubuntu-1204-lts-precise-pangolin
disk_config: manual
region: ORD
state: present
wait: yes
wait_timeout: 360
register: rax

- name: Create PTR record
local_action:
module: rax_dns_ptr
credentials: ~/.raxpub
name: ptr.example.org
server: "{{ (rax.instances|first).rax_id }}"
address: "{{ (rax.instances|first).rax_accessipv4 }}"
region: ORD
ttl: 3600
when: rax.action != 'delete'

- name: Modify PTR record
local_action:
module: rax_dns_ptr
credentials: ~/.raxpub
name: ptr.example.org
server: "{{ (rax.instances|first).rax_id }}"
address: "{{ (rax.instances|first).rax_accessipv4 }}"
region: ORD
ttl: 900
when: rax.action != 'delete'

- name: Delete PTR record
local_action:
module: rax_dns_ptr
credentials: ~/.raxpub
name: ptr.example.org
server: "{{ (rax.instances|first).rax_id }}"
address: "{{ (rax.instances|first).rax_accessipv4 }}"
region: ORD
state: absent
```