ensured backups and forced changes for confguration files; fixed issue with failing to look up path on remote machine for remote machine copying operations
This commit is contained in:
@@ -8,15 +8,18 @@
|
|||||||
when: ansible_facts["system"] == "Linux"
|
when: ansible_facts["system"] == "Linux"
|
||||||
ansible.builtin.shell:
|
ansible.builtin.shell:
|
||||||
cmd: "echo {{ ansible_user }}"
|
cmd: "echo {{ ansible_user }}"
|
||||||
|
register: current_user
|
||||||
- name: Copy system ViM configuration to home directory
|
- name: Copy system ViM configuration to home directory
|
||||||
become: true
|
become: true
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
remote_src: /root/.vimrc
|
src: /root/.vimrc
|
||||||
|
remote_src: true
|
||||||
dest: "{{ ansible_user_home.stdout }}/.vimrc"
|
dest: "{{ ansible_user_home.stdout }}/.vimrc"
|
||||||
owner: "{{ ansible_user }}"
|
owner: "{{ ansible_user }}"
|
||||||
group: "{{ ansible_user }}"
|
group: "{{ ansible_user }}"
|
||||||
mode: "644"
|
mode: "644"
|
||||||
state: present
|
force: true
|
||||||
|
backup: true
|
||||||
- name: Creating directory tree for NeoViM configuration files
|
- name: Creating directory tree for NeoViM configuration files
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: "{{ ansible_user_home.stdout }}/.config/nvim"
|
path: "{{ ansible_user_home.stdout }}/.config/nvim"
|
||||||
@@ -33,4 +36,5 @@
|
|||||||
owner: "{{ ansible_user }}"
|
owner: "{{ ansible_user }}"
|
||||||
group: "{{ ansible_user }}"
|
group: "{{ ansible_user }}"
|
||||||
mode: "644"
|
mode: "644"
|
||||||
state: present
|
force: true
|
||||||
|
backup: true
|
||||||
|
|||||||
Reference in New Issue
Block a user