Skip to content

Commit

Permalink
Merge pull request #90 from nhosoi/archive
Browse files Browse the repository at this point in the history
Instead of the archive module, use "tar" command for backup.
  • Loading branch information
rjeffman committed Jul 21, 2021
2 parents 310fc53 + 437ee95 commit 0494b9a
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions tests/tasks/setup_ipa.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,15 @@
- name: FAILURE - check entropy
command: cat /proc/sys/kernel/random/entropy_avail
- name: FAILURE - get logs for debugging
archive:
dest: /tmp/ipalogs.tgz
path:
- /var/log/messages
- /var/log/ipaserver-install.log
- /var/log/ipaclient-install.log
- /var/log/pki
mode: '0644'
shell: |-
set -euo pipefail
cd /var/log
tar -czf /tmp/ipalogs.tgz \
$( [[ -e messages ]] && echo messages ) \
$( [[ -e ipaserver-install.log ]] && echo ipaserver-install.log ) \
$( [[ -e ipaclient-install.log ]] && echo ipaclient-install.log ) \
$( [[ -e pki ]] && echo pki )
chmod '0644' /tmp/ipalogs.tgz
- name: FAILURE - grab archive
fetch:
src: /tmp/ipalogs.tgz
Expand Down

0 comments on commit 0494b9a

Please sign in to comment.