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

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 ?