ignore root user as home dir is elsewhere
This commit is contained in:
parent
7ea0ac386d
commit
f6dac7c5c1
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user