gantsign.zswap
Ansible Role: Zswap
This role sets up Zswap, a feature in the Linux kernel that helps manage memory by creating a compressed cache for swap data.
Requirements
- Ansible version 2.9 or higher
- A Linux Distribution, specifically one from the Debian family, such as:
- Ubuntu versions:
- Bionic (18.04)
- Focal (20.04)
- Ubuntu versions:
Role Variable
You can change how this role works by modifying the following variable (the default value is provided):
# The maximum percentage of RAM to use for the Zswap pool.
zswap_max_pool_percent: 20
Example Playbook
Here's an example of how to use this role in a playbook:
- hosts: servers
roles:
- role: gantsign.zswap
More Roles From GantSign
Explore additional roles by GantSign on Ansible Galaxy.
Development & Testing
This project uses Molecule for development and testing. It employs Testinfra and pytest for unit testing.
To develop or test this role, ensure you have the following installed:
To simplify installation, this project provides Molecule Wrapper, a script that installs Molecule and its dependencies (except Linux) and runs Molecule commands for you.
To test this role using Molecule Wrapper, run the following command from the project's main directory:
./moleculew test
Note: Some dependencies may require sudo
permission for installation.
License
This project is licensed under the MIT license.
Author Information
John Freeman
GantSign Ltd.
Company No. 06109112 (registered in England)
ansible-galaxy install gantsign.zswap