This Ansible role lets you manage one or multiple swap files. You can also manage kernel parameters related to how swap is used by the system.

Note that this role can not setup a swap file on a BTRFS filesystem.

Refer to debops.sysctl for paging and swapping related kernel settings.