# Route53 module creating TXT record InvalidTXTRDATA

**URL:** <https://forum.ansible.com/t/route53-module-creating-txt-record-invalidtxtrdata/18335>\
**Category:** Ansible Project\
**Tags:** aws\
**Created:** [May 28, 2015, 6:12pm UTC](https://forum.ansible.com/t/route53-module-creating-txt-record-invalidtxtrdata/18335 "2015-05-28T18:12:35Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![robb](https://avatars.discourse-cdn.com/v4/letter/r/a183cd/32.png) [@robb](https://forum.ansible.com/u/robb)\
**Post date:** [May 28, 2015, 6:12pm UTC](https://forum.ansible.com/t/route53-module-creating-txt-record-invalidtxtrdata/18335/1 "2015-05-28T18:12:35Z")

</div>

When I try to use the Route53 module to create a TXT record which has a value that is a variable, I get InvalidTXTRDATA error because Ansible is URL encoding the adjacent double quote character. Using a string instead of a variable is successful.

`

- set\_fact:  
my\_text: something\_here

- name: Publish Route53 txt record  
local\_action:  
module: route53  
region: “{{ region | default(omit) }}”  
profile: “{{ profile | default(omit) }}”

command: create  
overwrite: yes  
zone: “{{ domain }}”  
type: TXT  
record: “{{ my\_environment }}.{{ domain }}”  
value: ‘“{{ my\_text }}”’  
when: with\_dns\_txt | bool

TASK: [my\_role | Publish Route53 txt record] \*\*\*\*\*\*  
failed: [my\_host → 127.0.0.1] =\> {“failed”: true}  
msg: Invalid Resource Record: FATAL problem: InvalidTXTRDATA encountered at "something\_here  
`

Has anyone else had success with publishing a Route53 TXT record with a value based upon a variable? If so, what was your solution?  
In the meantime, I will use the AWS CLI to work around this issue.

Thanks,  
Robb
