Route53 module creating TXT record InvalidTXTRDATA

49 views
Skip to first unread message

ro...@pandastrike.com

unread,
May 28, 2015, 2:12:35 PM5/28/15
to ansible...@googlegroups.com
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

Reply all
Reply to author
Forward
0 new messages