forked from tim/k3s-ansible
56bb912bd3
k3s recommends swap be disabled on every node. Add a disable_swap toggle (default true) to the prereq role that turns swap off now and comments out the swap entries in /etc/fstab so swap stays off across reboots. The change is applied uniformly across all k3s_cluster hosts (all-or-nothing) since leaving swap on for some nodes but not others creates uneven scheduling and latency. - roles/prereq/defaults/main.yml: add disable_swap: true default - roles/prereq/tasks/main.yml: idempotent swapoff -a and fstab comment-out block gated on disable_swap - inventory/sample/group_vars/all.yml: document the new sample variable - README.md: document the disable_swap option - .github/scripts/test-disable-swap.sh: regression test - .pre-commit-config.yaml: wire the test into pre-commit Closes #670
7 lines
145 B
YAML
7 lines
145 B
YAML
---
|
|
disable_swap: true
|
|
|
|
secure_path:
|
|
RedHat: /sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin
|
|
Suse: /usr/sbin:/usr/bin:/sbin:/bin:/usr/local/bin
|