ignore root user as home dir is elsewhere

This commit is contained in:
Ibrahim Mkusa 2024-09-28 18:29:51 -04:00
parent 7ea0ac386d
commit f6dac7c5c1

View File

@ -36,19 +36,21 @@
- name: copy old bash configs to ...bak
copy:
src: "/home/{ansible_user_id}/{item}"
dest: "/home/{ansible_user_id}/{item}.bak"
src: "/home/{{ansible_user_id}}/{{item}}"
dest: "/home/{{ansible_user_id}}/{{item}}.bak"
loop:
- ".bashrc"
- ".bash_profile"
when: "{{ansible_user_id}}" != "root"
- name: delete old configs
file:
path: "/home/{ansible_user_id}/{item}"
path: "/home/{{ansible_user_id}}/{{item}}"
state: absent
loop:
- ".bashrc"
- ".bash_profile"
when: "{{ansible_user_id}}" != "root"
- name: link the dotfiles to users home directory
command: