forked from ansible-collections/community.aws
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update Examples with FQCN (ansible-collections#67)
Updated module examples with FQCN Signed-off-by: Abhijeet Kasurde <[email protected]> This commit was initially merged in https://github.com/ansible-collections/community.aws See: ansible-collections@98173ae
- Loading branch information
Showing
4 changed files
with
146 additions
and
144 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -212,108 +212,110 @@ | |
sample: foo.bar.com. | ||
''' | ||
|
||
EXAMPLES = ''' | ||
# Add new.foo.com as an A record with 3 IPs and wait until the changes have been replicated | ||
- route53: | ||
state: present | ||
zone: foo.com | ||
record: new.foo.com | ||
type: A | ||
ttl: 7200 | ||
value: 1.1.1.1,2.2.2.2,3.3.3.3 | ||
wait: yes | ||
# Update new.foo.com as an A record with a list of 3 IPs and wait until the changes have been replicated | ||
- route53: | ||
state: present | ||
zone: foo.com | ||
record: new.foo.com | ||
type: A | ||
ttl: 7200 | ||
value: | ||
- 1.1.1.1 | ||
- 2.2.2.2 | ||
- 3.3.3.3 | ||
wait: yes | ||
# Retrieve the details for new.foo.com | ||
- route53: | ||
state: get | ||
zone: foo.com | ||
record: new.foo.com | ||
type: A | ||
EXAMPLES = r''' | ||
- name: Add new.foo.com as an A record with 3 IPs and wait until the changes have been replicated | ||
community.aws.route53: | ||
state: present | ||
zone: foo.com | ||
record: new.foo.com | ||
type: A | ||
ttl: 7200 | ||
value: 1.1.1.1,2.2.2.2,3.3.3.3 | ||
wait: yes | ||
- name: Update new.foo.com as an A record with a list of 3 IPs and wait until the changes have been replicated | ||
community.aws.route53: | ||
state: present | ||
zone: foo.com | ||
record: new.foo.com | ||
type: A | ||
ttl: 7200 | ||
value: | ||
- 1.1.1.1 | ||
- 2.2.2.2 | ||
- 3.3.3.3 | ||
wait: yes | ||
- name: Retrieve the details for new.foo.com | ||
community.aws.route53: | ||
state: get | ||
zone: foo.com | ||
record: new.foo.com | ||
type: A | ||
register: rec | ||
# Delete new.foo.com A record using the results from the get command | ||
- route53: | ||
state: absent | ||
zone: foo.com | ||
record: "{{ rec.set.record }}" | ||
ttl: "{{ rec.set.ttl }}" | ||
type: "{{ rec.set.type }}" | ||
value: "{{ rec.set.value }}" | ||
- name: Delete new.foo.com A record using the results from the get command | ||
community.aws.route53: | ||
state: absent | ||
zone: foo.com | ||
record: "{{ rec.set.record }}" | ||
ttl: "{{ rec.set.ttl }}" | ||
type: "{{ rec.set.type }}" | ||
value: "{{ rec.set.value }}" | ||
# Add an AAAA record. Note that because there are colons in the value | ||
# that the IPv6 address must be quoted. Also shows using the old form command=create. | ||
- route53: | ||
command: create | ||
zone: foo.com | ||
record: localhost.foo.com | ||
type: AAAA | ||
ttl: 7200 | ||
value: "::1" | ||
# Add a SRV record with multiple fields for a service on port 22222 | ||
- name: Add an AAAA record | ||
community.aws.route53: | ||
command: create | ||
zone: foo.com | ||
record: localhost.foo.com | ||
type: AAAA | ||
ttl: 7200 | ||
value: "::1" | ||
# For more information on SRV records see: | ||
# https://en.wikipedia.org/wiki/SRV_record | ||
- route53: | ||
state: present | ||
zone: foo.com | ||
record: "_example-service._tcp.foo.com" | ||
type: SRV | ||
value: "0 0 22222 host1.foo.com,0 0 22222 host2.foo.com" | ||
# Add a TXT record. Note that TXT and SPF records must be surrounded | ||
- name: Add a SRV record with multiple fields for a service on port 22222 | ||
community.aws.route53: | ||
state: present | ||
zone: foo.com | ||
record: "_example-service._tcp.foo.com" | ||
type: SRV | ||
value: "0 0 22222 host1.foo.com,0 0 22222 host2.foo.com" | ||
# Note that TXT and SPF records must be surrounded | ||
# by quotes when sent to Route 53: | ||
- route53: | ||
state: present | ||
zone: foo.com | ||
record: localhost.foo.com | ||
type: TXT | ||
ttl: 7200 | ||
value: '"bar"' | ||
# Add an alias record that points to an Amazon ELB: | ||
- route53: | ||
state: present | ||
zone: foo.com | ||
record: elb.foo.com | ||
type: A | ||
value: "{{ elb_dns_name }}" | ||
alias: True | ||
alias_hosted_zone_id: "{{ elb_zone_id }}" | ||
# Retrieve the details for elb.foo.com | ||
- route53: | ||
state: get | ||
zone: foo.com | ||
record: elb.foo.com | ||
type: A | ||
- name: Add a TXT record. | ||
community.aws.route53: | ||
state: present | ||
zone: foo.com | ||
record: localhost.foo.com | ||
type: TXT | ||
ttl: 7200 | ||
value: '"bar"' | ||
- name: Add an alias record that points to an Amazon ELB | ||
community.aws.route53: | ||
state: present | ||
zone: foo.com | ||
record: elb.foo.com | ||
type: A | ||
value: "{{ elb_dns_name }}" | ||
alias: True | ||
alias_hosted_zone_id: "{{ elb_zone_id }}" | ||
- name: Retrieve the details for elb.foo.com | ||
community.aws.route53: | ||
state: get | ||
zone: foo.com | ||
record: elb.foo.com | ||
type: A | ||
register: rec | ||
# Delete an alias record using the results from the get command | ||
- route53: | ||
state: absent | ||
zone: foo.com | ||
record: "{{ rec.set.record }}" | ||
ttl: "{{ rec.set.ttl }}" | ||
type: "{{ rec.set.type }}" | ||
value: "{{ rec.set.value }}" | ||
alias: True | ||
alias_hosted_zone_id: "{{ rec.set.alias_hosted_zone_id }}" | ||
# Add an alias record that points to an Amazon ELB and evaluates it health: | ||
- route53: | ||
- name: Delete an alias record using the results from the get command | ||
community.aws.route53: | ||
state: absent | ||
zone: foo.com | ||
record: "{{ rec.set.record }}" | ||
ttl: "{{ rec.set.ttl }}" | ||
type: "{{ rec.set.type }}" | ||
value: "{{ rec.set.value }}" | ||
alias: True | ||
alias_hosted_zone_id: "{{ rec.set.alias_hosted_zone_id }}" | ||
- name: Add an alias record that points to an Amazon ELB and evaluates it health | ||
community.aws.route53: | ||
state: present | ||
zone: foo.com | ||
record: elb.foo.com | ||
|
@@ -323,39 +325,39 @@ | |
alias_hosted_zone_id: "{{ elb_zone_id }}" | ||
alias_evaluate_target_health: True | ||
# Add an AAAA record with Hosted Zone ID. | ||
- route53: | ||
state: present | ||
zone: foo.com | ||
hosted_zone_id: Z2AABBCCDDEEFF | ||
record: localhost.foo.com | ||
type: AAAA | ||
ttl: 7200 | ||
value: "::1" | ||
# Use a routing policy to distribute traffic: | ||
- route53: | ||
state: present | ||
zone: foo.com | ||
record: www.foo.com | ||
type: CNAME | ||
value: host1.foo.com | ||
ttl: 30 | ||
# Routing policy | ||
identifier: "host1@www" | ||
weight: 100 | ||
health_check: "d994b780-3150-49fd-9205-356abdd42e75" | ||
# Add a CAA record (RFC 6844): | ||
- route53: | ||
state: present | ||
zone: example.com | ||
record: example.com | ||
type: CAA | ||
value: | ||
- 0 issue "ca.example.net" | ||
- 0 issuewild ";" | ||
- 0 iodef "mailto:[email protected]" | ||
- name: Add an AAAA record with Hosted Zone ID | ||
community.aws.route53: | ||
state: present | ||
zone: foo.com | ||
hosted_zone_id: Z2AABBCCDDEEFF | ||
record: localhost.foo.com | ||
type: AAAA | ||
ttl: 7200 | ||
value: "::1" | ||
- name: Use a routing policy to distribute traffic | ||
community.aws.route53: | ||
state: present | ||
zone: foo.com | ||
record: www.foo.com | ||
type: CNAME | ||
value: host1.foo.com | ||
ttl: 30 | ||
# Routing policy | ||
identifier: "host1@www" | ||
weight: 100 | ||
health_check: "d994b780-3150-49fd-9205-356abdd42e75" | ||
- name: Add a CAA record (RFC 6844) | ||
community.aws.route53: | ||
state: present | ||
zone: example.com | ||
record: example.com | ||
type: CAA | ||
value: | ||
- 0 issue "ca.example.net" | ||
- 0 issuewild ";" | ||
- 0 iodef "mailto:[email protected]" | ||
''' | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.