You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Ansible-roles/kubernetes/tasks/prerequisites/swap.yml

11 lines
253 B
YAML

- name: Disable swap-mounts
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