Hi,

Thank you very much for the response. First let me explain what I'm trying to 
do here and then what I have done so far. 
I'm trying to call and rest api which I'm using URI module to do that. Success 
response of this api returns a xml response not json. But my end user needs the 
output from my ansible playbook to be json so others can consume it for other 
processes. This xml response comes in the content of the response. E.g. 
return_content : yes . So this content is a string which is in xml format. I 
need to sanitize it to remove characters like \n (new line). That's been done 
using regex_replace. So then we get the plain xml. Now this xml output needs to 
be shown in json manner. 
What i have been thinking and trying to do so far is create a python scrip 
which does the job. Then call the method in python script as a filter e.g. "{{ 
xml_response | xml_to_json}}". But stucked here on implementing this. Are there 
any easier work around for this? 

-- 
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/4d0c1c1f-ca37-49b4-9402-b73ff9f1db28%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to