mirror of
https://github.com/willshersystems/ansible-sshd
synced 2024-11-22 02:50:18 +01:00
Merge pull request #269 from richm/test-backup-restore-preserve-file-attrs
tests: Ensure backup/restore preserves file attributes
This commit is contained in:
commit
e54fca52c7
2 changed files with 2 additions and 2 deletions
|
@ -18,7 +18,7 @@
|
|||
set -eu
|
||||
if test -f {{ item }}; then
|
||||
mkdir -p {{ __sshd_test_backup.path }}/$(dirname {{ item }})
|
||||
cp {{ item }} {{ __sshd_test_backup.path }}/$(dirname {{ item }})
|
||||
cp -a {{ item }} {{ __sshd_test_backup.path }}/$(dirname {{ item }})
|
||||
fi
|
||||
changed_when: false
|
||||
loop: "{{ __sshd_test_backup_files | d([]) }}"
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
set -o pipefail
|
||||
fi
|
||||
if test -f {{ __sshd_test_backup.path }}/{{ item }}; then
|
||||
cp {{ __sshd_test_backup.path }}/{{ item }} $(dirname {{ item }})
|
||||
cp -a {{ __sshd_test_backup.path }}/{{ item }} $(dirname {{ item }})
|
||||
elif test -f {{ item }}; then
|
||||
rm {{ item }}
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue