This ansible role creates and configures Linux swapfiles.
Sufficient disk space to hold the swap file.
- Running
- Ansible 2.3+
- Testing
- Docker
- Molecule = 1.2.5
- Ansible 2.3.2.0 (Ansible-lint)
swapfile_Dir: /
: Directory where the swapfile will be createdswapfile_Name: swapfile
: Name of the swapfileswapsize_MB: 1024
: Size of swapfile (MiB)swap_swappiness: 30
: Set the value of vm.swappiness. Linux Kernel Docs
- hosts: servers
roles:
- { role: mplachter.swapfile }
MIT
Matthew Plachter