# Template module converting CRLF line endings to LF type on its own

**URL:** <https://forum.ansible.com/t/template-module-converting-crlf-line-endings-to-lf-type-on-its-own/21715>\
**Category:** Ansible Project\
**Tags:** windows\
**Created:** [June 9, 2016, 6:52am UTC](https://forum.ansible.com/t/template-module-converting-crlf-line-endings-to-lf-type-on-its-own/21715 "2016-06-09T06:52:27Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ishan\_jain](https://avatars.discourse-cdn.com/v4/letter/i/dc4da7/32.png) [@ishan\_jain](https://forum.ansible.com/u/ishan_jain)\
**Post date:** [June 9, 2016, 6:52am UTC](https://forum.ansible.com/t/template-module-converting-crlf-line-endings-to-lf-type-on-its-own/21715/1 "2016-06-09T06:52:27Z")

</div>

I am trying to create some configuration files which i intend to copy on windows host and for that i am using the template module:

- name: generate template  
template: src=“{{item.src}}” dest=“{{item.dest}}”  
with\_items: “{{files}}”

The destination is the Ansible host itself as i copy the files later on in some other script. Now for the source, i have these configuration files which (i made sure) have DOS style CRLF line endings. But somehow, the template module is converting them to LF line endings on its own, because of which i get single line files on windows host when i copy them later on.

How can make sure that the line endings are preserved with template module ? Is there any option in win\_copy where i can make sure that line endings are fixed before copying ?
