Skip to content

Instantly share code, notes, and snippets.

@fizz
fizz / swap.pp
Last active September 30, 2016 01:41 — forked from philfreo/swap.pp
Manage swap on a node with puppet
# Manages swapspace on a node.
#
# Based on https://gist.github.com/Yggdrasil/3918632
#
# Parameters:
# - $ensure Allows creation or removal of swapspace and the corresponding file.
# - $swapfile Defaults to /mnt which is a fast ephemeral filesystem on EC2 instances.
# This keeps performance reasonable while avoiding I/O charges on EBS.
# - $swapsize Size of the swapfile in MB. Defaults to memory size.
#