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
|
- name: copy old bash configs to ...bak
|
||||||
copy:
|
copy:
|
||||||
src: "/home/{ansible_user_id}/{item}"
|
src: "/home/{{ansible_user_id}}/{{item}}"
|
||||||
dest: "/home/{ansible_user_id}/{item}.bak"
|
dest: "/home/{{ansible_user_id}}/{{item}}.bak"
|
||||||
loop:
|
loop:
|
||||||
- ".bashrc"
|
- ".bashrc"
|
||||||
- ".bash_profile"
|
- ".bash_profile"
|
||||||
|
when: "{{ansible_user_id}}" != "root"
|
||||||
|
|
||||||
- name: delete old configs
|
- name: delete old configs
|
||||||
file:
|
file:
|
||||||
path: "/home/{ansible_user_id}/{item}"
|
path: "/home/{{ansible_user_id}}/{{item}}"
|
||||||
state: absent
|
state: absent
|
||||||
loop:
|
loop:
|
||||||
- ".bashrc"
|
- ".bashrc"
|
||||||
- ".bash_profile"
|
- ".bash_profile"
|
||||||
|
when: "{{ansible_user_id}}" != "root"
|
||||||
|
|
||||||
- name: link the dotfiles to users home directory
|
- name: link the dotfiles to users home directory
|
||||||
command:
|
command:
|
||||||
|
Loading…
Reference in New Issue
Block a user