2018-06-21 14:17:03 +08:00
|
|
|
---
|
|
|
|
- name: Remove swapfile from /etc/fstab
|
|
|
|
mount:
|
2018-12-11 18:42:00 +08:00
|
|
|
name: "{{ item }}"
|
2018-06-21 14:17:03 +08:00
|
|
|
fstype: swap
|
|
|
|
state: absent
|
2018-12-11 18:42:00 +08:00
|
|
|
with_items:
|
|
|
|
- swap
|
|
|
|
- none
|
2018-06-21 14:17:03 +08:00
|
|
|
|
|
|
|
- name: Disable swap
|
|
|
|
command: swapoff -a
|
|
|
|
when: ansible_swaptotal_mb > 0
|