Skip to content

Commit

Permalink
Switch to using geerlingguy.swap role to manage swap on K8s nodes.
Browse files Browse the repository at this point in the history
  • Loading branch information
geerlingguy committed Aug 29, 2018
1 parent bfbbfe3 commit 69eb81e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 17 deletions.
20 changes: 3 additions & 17 deletions kubernetes/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,24 +11,10 @@
src: files/manifests/kube-system/kube-flannel-vagrant.yml
dest: "~/kube-flannel-vagrant.yml"

- name: Disable swap immediately.
shell: swapoff --all
when: ansible_swaptotal_mb > 0
tags: ['always']

- name: Disable swap permanently.
mount:
name: none
src: /dev/mapper/packer--debian--9--amd64--vg-swap_1
fstype: swap
opts: sw
passno: 0
dump: 0
state: absent
when: ansible_swaptotal_mb > 0
tags: ['always']

roles:
- role: geerlingguy.swap
tags: ['swap', 'kubernetes']

- role: geerlingguy.pip
tags: ['pip', 'docker']

Expand Down
1 change: 1 addition & 0 deletions kubernetes/requirements.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
- src: geerlingguy.swap
- src: geerlingguy.pip
- src: geerlingguy.docker
- src: geerlingguy.kubernetes
3 changes: 3 additions & 0 deletions kubernetes/vars/main.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
---
swap_file_state: absent
swap_file_path: /dev/mapper/packer--debian--9--amd64--vg-swap_1

docker_package: docker-ce=18.06.1~ce~3-0~debian

kubernetes_allow_pods_on_master: False
Expand Down

0 comments on commit 69eb81e

Please sign in to comment.