Merge pull request #813 from cevich/addswap
Add file-backed swap to prevent OOM
This commit is contained in:
commit
f7cbbf5e69
1 changed files with 7 additions and 0 deletions
|
@ -76,6 +76,13 @@
|
||||||
async: 600
|
async: 600
|
||||||
poll: 10
|
poll: 10
|
||||||
when: ansible_distribution == 'Fedora'
|
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
|
- name: Make testing directories to conform to testing standards
|
||||||
file:
|
file:
|
||||||
path: "{{ item }}"
|
path: "{{ item }}"
|
||||||
|
|
Loading…
Reference in a new issue