- The new value when creating a DNS record. Multiple comma-spaced values are allowed. When deleting a record all values for the record must be specified or Route53 will not delete it.
required: false
default: null
aliases: []
ec2_secret_key:
description:
- EC2 secret key. If not specified then the EC2_SECRET_KEY environment variable is used.
required: false
default: null
aliases: []
ec2_access_key:
description:
- EC2 access key. If not specified then the EC2_ACCESS_KEY environment variable is used.
required: false
default: null
aliases: []
requirements: [ "boto" ]
author: Bruce Pennypacker
'''
EXAMPLES='''
# Add new.foo.com as an A record with 3 IP's
- route53: >
command=create
zone=foo.com
record=new.foo.com
type=A
ttl=7200
value=1.1.1.1,2.2.2.2,3.3.3.3
# Retrieve the details for new.foo.com
- route53: >
command=get
zone=foo.com
record=new.foo.com
type=A
register: rec
# Delete new.foo.com's A record using the results from the 'get'
- route53: >
command=delete
zone=foo.com
record={{ r.set.record }}
type={{ r.set.type }}
value={{ r.set.value }}
.''
import sys
try:
import boto
from boto import route53
from boto.route53.record import ResourceRecordSets
except ImportError:
print "failed=True msg='boto required for this module'"