diff --git a/roles/init-server/tasks/contingent/pkg/neovim.yml b/roles/init-server/tasks/contingent/pkg/neovim.yml index 773ad4f..90a91ae 100644 --- a/roles/init-server/tasks/contingent/pkg/neovim.yml +++ b/roles/init-server/tasks/contingent/pkg/neovim.yml @@ -8,15 +8,18 @@ when: ansible_facts["system"] == "Linux" ansible.builtin.shell: cmd: "echo {{ ansible_user }}" + register: current_user - name: Copy system ViM configuration to home directory become: true ansible.builtin.copy: - remote_src: /root/.vimrc + src: /root/.vimrc + remote_src: true dest: "{{ ansible_user_home.stdout }}/.vimrc" owner: "{{ ansible_user }}" group: "{{ ansible_user }}" mode: "644" - state: present + force: true + backup: true - name: Creating directory tree for NeoViM configuration files ansible.builtin.file: path: "{{ ansible_user_home.stdout }}/.config/nvim" @@ -33,4 +36,5 @@ owner: "{{ ansible_user }}" group: "{{ ansible_user }}" mode: "644" - state: present + force: true + backup: true