Remove ~/bin before linking

This commit is contained in:
2020-02-24 10:48:02 +01:00
parent f33d9a60f4
commit 3b0e5220ab

View File

@@ -204,6 +204,20 @@
- ~/.var/run - ~/.var/run
- ~/.usr/lib - ~/.usr/lib
- name: stat ~/bin
stat:
path: "/home/{{ user.name }}/bin"
register: bin_stat
- name: remove ~/bin if not a link
file:
state: absent
path: "/home/{{ user.name }}/bin"
when:
- bin_stat.stat.exists
- not bin_stat.stat.islnk
- name: link bin directory - name: link bin directory
file: file:
state: link state: link