Description
For an Ansible task that creates or updates a Route 53 record, set value for the record type. A lookup needs no value.
Potential impact
A missing value prevents the DNS change and can delay a service cutover.
Remediation
Use one target domain name for a CNAME. Check the hosted zone, record name, routing policy and health-check ID, then verify the DNS answer with dig or nslookup.
Examples
Both tasks configure a weighted record for www.foo.com. The first task’s empty value: is YAML null. The second sets host1.foo.com as the target. Substitute the domains and health check you manage.
Before
yaml
- name: Use a routing policy to distribute traffic
community.aws.route53:
state: present
zone: foo.com
record: www.foo.com
type: CNAME
value:
ttl: 30
identifier: "host1@www"
weight: 100
health_check: "d994b780-3150-49fd-9205-356abdd42e75"
After
yaml
- 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
identifier: host1@www
weight: 100
health_check: d994b780-3150-49fd-9205-356abdd42e75