using lineinfile module for modifying XML file issue

Hi,

We are using ansible 1.5.3, and trying to replace/add a line to a xml file. But after lineinfile task is executed, the file format got changed from the Linux to windows, we observed that the end of line for all the line (except the line added or replaced) has been changed (end of line with ^M). We double checked the xml file format before the liniinfile task executed was correct linux format. Any idea about this?

Thanks
Jack

Sorry for late response here – PyCON travel and such.

“except the line added or replaced) has been changed (end of line with ^M)”

Are you saying Windows files get changed to Linux format, instead of the opposite?

I’d expect this to be the case.