Disable swap

role_kubernetes
Ruakij 2 years ago
parent 0d2e715980
commit 7e83a43755

@ -1,2 +1,10 @@
- name: Disable swap - name: Disable swap-mounts
command: swapoff -a replace:
path: /etc/fstab
regexp: '^([ \t]*(?!#)\S+[ \t]+swap[ \t]+.*)'
replace: '# \1'
- name: Disable active swap immediately
command: swapoff -va
changed_when: "command.stdout != ''"
register: command

Loading…
Cancel
Save