swapfile
Ansible Role: Swapfile
This role configures a swapfile.
Requirements
Sufficient disk space to hold the swap file.
Role Variables
swapfile_path
: full path to the swap file to create (e.g.:/swapfile
); when empty, no swap file will be createdswapfile_size_mib
: the size of the swap file (MiB); when negative or zero, no swap file will be createdswapfile_use_dd
:False
(default) if usefallocate
to create the file,True
to usedd
swapfile_swappiness
: if notFalse
, set the value ofvm.swappiness
to this valueswapfile_vfs_cache_pressure
: if notFalse
, set the value ofvm.vfs_cache_pressure
to this value
Dependencies
None.
Usage
- hosts: all
roles:
- sjinks.swapfile
or
- hosts: all
roles:
- { role: sjinks.swapfile, swapfile_location: /swap, swafile_size_mib: 1024 }
License
MIT, see LICENSE file.
Install
ansible-galaxy install sjinks/ansible-role-swapfile
License
mit
Downloads
39
Owner
Developing server and web applications for 20+ years. Involved in designing and writing very complex and high-performance software.