phpservermon/puphpet/puppet/modules/swap_file
Pepijn Over 93ddf5139b Adding Vagrantfile w/ puphpet configuration for easy development 2014-12-05 15:05:52 +01:00
..
manifests Adding Vagrantfile w/ puphpet configuration for easy development 2014-12-05 15:05:52 +01:00
spec Adding Vagrantfile w/ puphpet configuration for easy development 2014-12-05 15:05:52 +01:00
tests Adding Vagrantfile w/ puphpet configuration for easy development 2014-12-05 15:05:52 +01:00
.fixtures.yml Adding Vagrantfile w/ puphpet configuration for easy development 2014-12-05 15:05:52 +01:00
.rspec Adding Vagrantfile w/ puphpet configuration for easy development 2014-12-05 15:05:52 +01:00
.travis.yml Adding Vagrantfile w/ puphpet configuration for easy development 2014-12-05 15:05:52 +01:00
CHANGELOG.md Adding Vagrantfile w/ puphpet configuration for easy development 2014-12-05 15:05:52 +01:00
CONTRIBUTING.md Adding Vagrantfile w/ puphpet configuration for easy development 2014-12-05 15:05:52 +01:00
CONTRIBUTORS Adding Vagrantfile w/ puphpet configuration for easy development 2014-12-05 15:05:52 +01:00
Gemfile Adding Vagrantfile w/ puphpet configuration for easy development 2014-12-05 15:05:52 +01:00
Gemfile.lock Adding Vagrantfile w/ puphpet configuration for easy development 2014-12-05 15:05:52 +01:00
Guardfile Adding Vagrantfile w/ puphpet configuration for easy development 2014-12-05 15:05:52 +01:00
LICENSE Adding Vagrantfile w/ puphpet configuration for easy development 2014-12-05 15:05:52 +01:00
Modulefile Adding Vagrantfile w/ puphpet configuration for easy development 2014-12-05 15:05:52 +01:00
README.markdown Adding Vagrantfile w/ puphpet configuration for easy development 2014-12-05 15:05:52 +01:00
Rakefile Adding Vagrantfile w/ puphpet configuration for easy development 2014-12-05 15:05:52 +01:00

README.markdown

####Table of Contents

  1. Overview
  2. Module Description
  3. Setup
  4. Usage
  5. Reference
  6. Limitations
  7. Development

##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! :)