use swapon -s (#4216)
parent
8872b2e0c6
commit
e03588f431
|
@ -8,6 +8,11 @@
|
|||
- swap
|
||||
- none
|
||||
|
||||
# kubelet fails even if ansible_swaptotal_mb = 0
|
||||
- name: check swap
|
||||
command: /sbin/swapon -s
|
||||
register: swapon
|
||||
changed_when: no
|
||||
- name: Disable swap
|
||||
command: swapoff -a
|
||||
when: ansible_swaptotal_mb > 0
|
||||
command: /sbin/swapoff -a
|
||||
when: swapon.stdout != ""
|
||||
|
|
Loading…
Reference in New Issue