integration-playbook: Don't re-swap
If the playbook is run multiple times, it can result in the in-use swap file being truncated. A decidedly bad thing that can be avoided by checking for it's existence first. Signed-off-by: Chris Evich <cevich@redhat.com>
This commit is contained in:
parent
a3a0bb5e55
commit
ef839a7bbc
1 changed files with 2 additions and 1 deletions
|
@ -84,11 +84,12 @@
|
|||
when: ansible_distribution == 'Fedora'
|
||||
- name: Setup swap to prevent kernel firing off the OOM killer
|
||||
shell: |
|
||||
[ ! -f /root/swap ] && \
|
||||
truncate -s 8G /root/swap && \
|
||||
export SWAPDEV=$(losetup --show -f /root/swap | head -1) && \
|
||||
mkswap $SWAPDEV && \
|
||||
swapon $SWAPDEV && \
|
||||
swapon --show
|
||||
swapon --show || true
|
||||
- name: Make testing directories to conform to testing standards
|
||||
file:
|
||||
path: "{{ item }}"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue