k3s-ansible/roles
Timothy Stewart fb6fe7bcd7 feat(prereq): add toggle to disable swap on all cluster nodes
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
2026-08-05 05:20:30 -05:00
..
download fix(ci): harden Molecule download and cleanup 2026-08-01 12:27:12 -05:00
k3s/node/defaults Replace hardcoded 'master' group name with 'group_name_master' variable (#337) 2023-07-21 16:37:57 -05:00
k3s_agent fix(token): escape percent signs used in k3s token (#682) 2026-08-02 19:27:17 +00:00
k3s_custom_registries Change to FQCN with ansible-lint fixer (#553) 2024-08-12 22:59:59 -05:00
k3s_server chore(deps): apply dependency updates in one combined change (#694) 2026-08-04 17:54:58 -05:00
k3s_server_post feat(metallb): add option to limit MetalLB layer2 announcements to specific interfaces (#696) 2026-08-05 02:48:24 -05:00
lxc Variable documentation (#606) 2024-11-06 10:27:19 -06:00
prereq feat(prereq): add toggle to disable swap on all cluster nodes 2026-08-05 05:20:30 -05:00
proxmox_lxc Variable documentation (#606) 2024-11-06 10:27:19 -06:00
raspberrypi Variable documentation (#606) 2024-11-06 10:27:19 -06:00
reset Change to FQCN with ansible-lint fixer (#553) 2024-08-12 22:59:59 -05:00
reset_proxmox_lxc Variable documentation (#606) 2024-11-06 10:27:19 -06:00