Skip to content

Instantly share code, notes, and snippets.

@egeland
egeland / swap.pp
Last active December 24, 2015 15:39 — forked from hertell/swap.pp
# Manages swapspace on a node.
#
# This version is based on https://gist.github.com/hertell/6688708,
# which is based on https://gist.github.com/philfreo/6576492 and that
# again is based on https://gist.github.com/Yggdrasil/3918632
#
# Parameters:
# - [*ensure8] - Allows creation or removal of swapfiles.
# - [*swapfile*] - Defaults to /mnt which is a fast ephemeral filesystem on EC2 instances.
# This keeps performance reasonable while avoiding I/O charges on EBS.