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

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/f7c99384-ea11-4298-84b6-93055c36b98e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to