diff --git a/roles/common/tasks/users-systemfiles.yml b/roles/common/tasks/users-systemfiles.yml index 95b4d94..09fdd7a 100644 --- a/roles/common/tasks/users-systemfiles.yml +++ b/roles/common/tasks/users-systemfiles.yml @@ -32,7 +32,7 @@ - bash - name: (users-systemfiles.yml) Backup existing users .bashrc file - command: cp ~{{ item.item.name }}/.bashrc ~{{ item.item.name }}/.bashrc.ORIG + command: cp -a ~{{ item.item.name }}/.bashrc ~{{ item.item.name }}/.bashrc.ORIG loop: "{{ bashrc_user_orig_exists.results }}" loop_control: label: '{{ item.item.name }}' @@ -97,7 +97,7 @@ - profile - name: (users-systemfiles.yml) Backup existing users .profile file - command: cp ~{{ item.item.name }}/.profile ~{{ item.item.name }}/.profile.ORIG + command: cp -a ~{{ item.item.name }}/.profile ~{{ item.item.name }}/.profile.ORIG loop: "{{ profile_user_orig_exists.results }}" loop_control: label: '{{ item.item.name }}'