Skip to content
Snippets Groups Projects
Unverified Commit 1aee6ec3 authored by Rong Zhang's avatar Rong Zhang Committed by GitHub
Browse files

Merge pull request #2903 from riverzhang/swap

Add manage swap on the worker node
parents cbb95915 3232e274
No related branches found
No related tags found
No related merge requests found
--- ---
# Disable swap
- import_tasks: swapoff.yml
when: disable_swap
- import_tasks: verify-settings.yml - import_tasks: verify-settings.yml
tags: tags:
- asserts - asserts
......
---
- name: Remove swapfile from /etc/fstab
mount:
name: swap
fstype: swap
state: absent
- name: Disable swap
command: swapoff -a
when: ansible_swaptotal_mb > 0
...@@ -12,6 +12,8 @@ kube_api_anonymous_auth: false ...@@ -12,6 +12,8 @@ kube_api_anonymous_auth: false
# Default value, but will be set to true automatically if detected # Default value, but will be set to true automatically if detected
is_atomic: false is_atomic: false
# optional disable the swap
disable_swap: false
## Change this to use another Kubernetes version, e.g. a current beta release ## Change this to use another Kubernetes version, e.g. a current beta release
kube_version: v1.10.4 kube_version: v1.10.4
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment