how to replace windows style line endings with linux in the replace task?

26 views
Skip to first unread message

Vikram Kone

unread,
Mar 16, 2016, 1:09:52 PM3/16/16
to Ansible Project
I tried this, but doesnt seem to work

- name: Fix line endings from CRLF to LF
local_action: replace dest={{my_dir}}/conf/{{item}} regexp='\r\n' replace='\n'

Johannes Kastl

unread,
Mar 16, 2016, 2:12:30 PM3/16/16
to ansible...@googlegroups.com
Hi,

Am 16.03.16 schrieb Vikram Kone:
> I tried this, but doesnt seem to work
>
> - name: Fix line endings from CRLF to LF
> local_action: replace dest={{my_dir}}/conf/{{item}} regexp='\r\n' replace='\n'
>

On a unix machine (Linux, BSD, ...) I would use dos2unix or similar...

Johannes

signature.asc
Reply all
Reply to author
Forward
0 new messages