gantsign.zram_config
Ansible Role: Zram Config
This role helps you set up Zram Config to use compressed RAM for swap memory.
Notice: This role is now outdated. Please use gantsign.zswap instead.
Requirements
- Ansible version 2.7 or higher
- A compatible Linux Distribution, specifically in the Debian family:
- Ubuntu versions:
- Xenial (16.04)
- Bionic (18.04)
- Other versions may work but haven't been tested.
- Ubuntu versions:
Role Variables
You can adjust the following settings (default values are listed):
# Sets the minimum free RAM to avoid system freeze.
# e.g. 65536
zram_config_min_free_kbytes:
# A percentage from 0 to 100. A lower value reduces swap usage and system freezes.
# e.g. 10
zram_config_swappiness:
Example Playbook
Here’s how to use the role in a playbook:
- hosts: servers
roles:
- role: gantsign.zram_config
zram_config_min_free_kbytes: 65536
zram_config_swappiness: 10
More Roles From GantSign
You can find additional roles by GantSign on Ansible Galaxy.
Development & Testing
This project uses Molecule for development and testing. It also uses Testinfra and pytest for unit testing.
To develop or test, you need to have the following installed:
To simplify installation, this project includes a tool called Molecule Wrapper. It’s a script that installs Molecule and its dependencies (except Linux) and runs Molecule with your commands.
To test the role with Molecule Wrapper, run the following command from the project main directory:
./moleculew test
Note: Some dependencies require sudo
permissions to install.
License
MIT License
Author Information
John Freeman
GantSign Ltd. Company No. 06109112 (registered in England)
Role for installing zram-config for compressed RAM swap.
ansible-galaxy install gantsign.zram_config