From f6dac7c5c191a9d839d32a1cbfe5000f62b8756f Mon Sep 17 00:00:00 2001 From: Ibrahim Mkusa Date: Sat, 28 Sep 2024 18:29:51 -0400 Subject: [PATCH] ignore root user as home dir is elsewhere --- install.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/install.yml b/install.yml index 87dbc84..82fe1b3 100644 --- a/install.yml +++ b/install.yml @@ -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: