diff --git a/tasks/vim.yml b/tasks/vim.yml index 0a3a8a3..34b1284 100644 --- a/tasks/vim.yml +++ b/tasks/vim.yml @@ -1,7 +1,14 @@ +- name: Check /etc/vim/vimrc path + stat: + path: /etc/vim/vimrc + register: vimrc_full_path + + + - name: Copy simple vimrc copy: src: files/vimrc - dest: /etc/vim/vimrc + dest: "{{ vimrc_full_path.stat.exists | ternary ('/etc/vim/vimrc', '/etc/vimrc') }}" owner: root group: root - mode: 0644 \ No newline at end of file + mode: 0644