Add manage swap on the worker node

This commit is contained in:
rongzhang
2018-06-21 06:17:03 +00:00
parent 1a25903583
commit 3232e2743e
3 changed files with 16 additions and 0 deletions

View File

@@ -0,0 +1,10 @@
---
- name: Remove swapfile from /etc/fstab
mount:
name: swap
fstype: swap
state: absent
- name: Disable swap
command: swapoff -a
when: ansible_swaptotal_mb > 0