# ansible templates automatic conversion from windows to unix

**URL:** <https://forum.ansible.com/t/ansible-templates-automatic-conversion-from-windows-to-unix/23636>\
**Category:** Ansible Project\
**Tags:** windows\
**Created:** [February 4, 2017, 6:24am UTC](https://forum.ansible.com/t/ansible-templates-automatic-conversion-from-windows-to-unix/23636 "2017-02-04T06:24:50Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ioannis\_Cherouvim](https://avatars.discourse-cdn.com/v4/letter/i/71e660/32.png) [@Ioannis\_Cherouvim](https://forum.ansible.com/u/Ioannis_Cherouvim)\
**Post date:** [February 4, 2017, 6:24am UTC](https://forum.ansible.com/t/ansible-templates-automatic-conversion-from-windows-to-unix/23636/1 "2017-02-04T06:24:50Z")

</div>

Hello

All of my playbooks target linux machines, but some of the j2 templates on those playbooks have a windows line ending style due to the way they were initially created (on windows machines). Is there an automatic way for the template directive to also apply a dos2unix style conversion? I know I can convert the templates themselves, but I’ve got many developers touching and adding templates so I’d like an automatic way for the conversion while rendering.

thanks
