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: