summaryrefslogtreecommitdiff
path: root/config-desktop
diff options
context:
space:
mode:
authorRobin Krahl <me@robin-krahl.de>2019-01-22 00:40:39 +0100
committerRobin Krahl <me@robin-krahl.de>2019-01-22 00:40:39 +0100
commit5329293c16f9286b19ed17016ed5bcdd44f16def (patch)
tree3d31c4fd1b2ef478d0bb2bf30d53acce4a048c0d /config-desktop
parent184909d15d250a8b421e74098701856f71c652eb (diff)
downloadansible-roles-5329293c16f9286b19ed17016ed5bcdd44f16def.tar.gz
ansible-roles-5329293c16f9286b19ed17016ed5bcdd44f16def.tar.bz2
Check bashrc status before stowing bash
Diffstat (limited to 'config-desktop')
-rw-r--r--config-desktop/tasks/main.yaml9
1 files changed, 9 insertions, 0 deletions
diff --git a/config-desktop/tasks/main.yaml b/config-desktop/tasks/main.yaml
index eb63217..3f72a14 100644
--- a/config-desktop/tasks/main.yaml
+++ b/config-desktop/tasks/main.yaml
@@ -18,6 +18,15 @@
dest: "/home/{{ user_name }}/.local/share/dotfiles-private"
repo: "{{ dotfiles_private }}"
verify_commit: yes
+- name: Check .bashrc status
+ stat:
+ path: "/home/{{ user_name }}/.bashrc"
+ register: bashrc
+- name: Delete bashrc if not a link
+ file:
+ path: "/home/{{ user_name }}/.bashrc"
+ state: absent
+ when: bashrc.stat.islnk is defined and bashrc.stat.islnk == False
- name: Apply private dotfiles
command: "stow --target /home/{{ user_name }}/ --dir /home/{{ user_name }}/.local/share/dotfiles-private {{ item }}"
with_items: