|
---
|
|
- name: Disable swap
|
|
block:
|
|
- name: Disable swap
|
|
become: true
|
|
ansible.builtin.command: "swapoff -a"
|
|
when: ansible_swaptotal_mb > 0
|
|
|
|
- name: Remove swap entry from fstab
|
|
become: true
|
|
mount:
|
|
name: "{{ item }}"
|
|
fstype: swap
|
|
state: absent
|
|
with_items:
|
|
- swap
|
|
- none
|