1.2 KiB
1.2 KiB
####Table of Contents
##Overview
Manage swap files for your Linux environments. This is based on the gist by @Yggdrasil, with a few changes and added specs.
##Setup
###What swap_file affects
- Swapfiles on the system
- Any mounts of swapfiles
##Usage
The simplest use of the module is this:
include swap
By default, the module it will create a swap file under /mnt/swap.1
with the default size taken from the $::memorysizeinbytes
fact divided by 1000000.
For a custom setup, you can do something like this:
swap {
swapfile => '/swapfile/swap1',
swapfilesize => '1000000'
}
To remove a prexisting swap, you can use ensure absent:
swap {
ensure => 'absent'
swapfile => '/swapfile/swap1',
}
##Limitations
Primary support is for Debian and RedHat, but should work on all Linux flavours.
##Development
Follow the CONTRIBUTING guidelines! :)