From 7ea0ac386d908fd950396aa947592f2dcdc10516 Mon Sep 17 00:00:00 2001 From: Ibrahim Mkusa Date: Sat, 28 Sep 2024 18:12:43 -0400 Subject: [PATCH] clean up to avoid stow conflicts --- install.yml | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/install.yml b/install.yml index b339f95..87dbc84 100644 --- a/install.yml +++ b/install.yml @@ -18,6 +18,7 @@ - tmux when: ansible_os_family == "Debian" become: yes + become_user: root - name: install packages on redhat host dnf: @@ -31,6 +32,23 @@ state: latest when: ansible_os_family == "RedHat" become: yes + become_user: root + + - name: copy old bash configs to ...bak + copy: + src: "/home/{ansible_user_id}/{item}" + dest: "/home/{ansible_user_id}/{item}.bak" + loop: + - ".bashrc" + - ".bash_profile" + + - name: delete old configs + file: + path: "/home/{ansible_user_id}/{item}" + state: absent + loop: + - ".bashrc" + - ".bash_profile" - name: link the dotfiles to users home directory command: @@ -42,5 +60,3 @@ - shellenv - tmux - vim - -