arillso.system.zram role – Configure compressed RAM swap (zram) on Linux systems
Note
This role is part of the arillso.system collection (version 1.1.6).
It is not included in ansible-core.
To check whether it is installed, run ansible-galaxy collection list.
To install it use: ansible-galaxy collection install arillso.system.
To use it in a playbook, specify: arillso.system.zram.
Entry point main – Configure compressed RAM swap (zram) on Linux systems
Synopsis
Installs the zram-tools package and the kernel module that provides zram
Validates the requested compression algorithm against kernel capabilities
Deploys /etc/default/zramswap and enables the zramswap service
arillso
Parameters
Parameter |
Comments |
|---|---|
Kernel compression algorithm for the zram device Validated at runtime against /sys/block/zram0/comp_algorithm Default: |
|
Enable or disable the zram role; false makes every task a no-op Choices:
|
|
Package that provides the zram kernel module; empty value skips the install On Ubuntu, resolved at runtime to linux-modules-extra-<kernel> so kernel upgrades pull the matching package Empty on Debian, which ships the zram module in the stock kernel with no separate package |
|
Distribution packages to install that provide zram userspace tooling Default: |
|
Percentage of physical RAM to allocate as the zram swap device 50 means a 16 GB host gets an 8 GB zram device Default: |
|
Linux swap priority for the zram device (higher wins) Should be greater than any disk-based swap priority so the kernel fills zram first Default: |