Skip to content

Instantly share code, notes, and snippets.

@Himura2la
Last active April 6, 2022 08:25
Show Gist options
  • Save Himura2la/4daf4c303bf1f7729d13ce2b9f3a4248 to your computer and use it in GitHub Desktop.
Save Himura2la/4daf4c303bf1f7729d13ce2b9f3a4248 to your computer and use it in GitHub Desktop.
Fix CRLF on file copy in Ansible
* text=auto eol=lf
- name: vimrc is up to date
copy:
content: "{{ lookup('file', '.vimrc') | regex_replace('\\r$', '', multiline=True) }}\n"
dest: /home/{{ ansible_user }}/.vimrc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment