use swapon -s (#4216)
This commit is contained in:
parent
8872b2e0c6
commit
e03588f431
1 changed files with 7 additions and 2 deletions
|
@ -8,6 +8,11 @@
|
||||||
- swap
|
- swap
|
||||||
- none
|
- none
|
||||||
|
|
||||||
|
# kubelet fails even if ansible_swaptotal_mb = 0
|
||||||
|
- name: check swap
|
||||||
|
command: /sbin/swapon -s
|
||||||
|
register: swapon
|
||||||
|
changed_when: no
|
||||||
- name: Disable swap
|
- name: Disable swap
|
||||||
command: swapoff -a
|
command: /sbin/swapoff -a
|
||||||
when: ansible_swaptotal_mb > 0
|
when: swapon.stdout != ""
|
||||||
|
|
Loading…
Reference in a new issue