Merge pull request #813 from cevich/addswap

Add file-backed swap to prevent OOM
This commit is contained in:
Antonio Murdaca 2017-09-07 14:56:08 +02:00 committed by GitHub
commit f7cbbf5e69

View file

@ -76,6 +76,13 @@
async: 600
poll: 10
when: ansible_distribution == 'Fedora'
- name: Setup swap to prevent kernel firing off the OOM killer
shell: |
truncate -s 8G /root/swap && \
export SWAPDEV=$(losetup --show -f /root/swap | head -1) && \
mkswap $SWAPDEV && \
swapon $SWAPDEV && \
swapon --show
- name: Make testing directories to conform to testing standards
file:
path: "{{ item }}"