Ansible role to manage a swap file in Debian-like systems.
fallocate(will be installed)
swapfile_size: [default:1G,falseto do nothing]: The size of the swap file to create in the format thatfallocateexpects: The length and offset arguments may be followed by binary (2^N) suffixes KiB, MiB, GiB, TiB, PiB and EiB (the "iB" is optional, e.g. "K" has the same meaning as "KiB") or decimal (10^N) suffixes KB, MB, GB, PB and EB.swapfile_swappiness: [optional]: The swappiness percentage (vm.swappiness) -- the lower it is, the less your system swaps memory pagesswapfile_vfs_cache_pressure: [optional]: This percentage value controls the tendency of the kernel to reclaim the memory which is used for caching of directory and inode objects
None
- hosts: all
roles:
- oefenweb.swapfileor:
- hosts: all
roles:
- role: oefenweb.swapfile
swapfile_size: 1GB
swapfile_swappiness: 10MIT
Mischa ter Smitten (based on work of kamaln7)
Are welcome!