Skip to content

Instantly share code, notes, and snippets.

@andredumas
Created March 18, 2014 03:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andredumas/9613094 to your computer and use it in GitHub Desktop.
Save andredumas/9613094 to your computer and use it in GitHub Desktop.
Chef port of the swap puppet manifest (https://gist.github.com/andredumas/9612937)
execute "mkswap" do
command "dd if=/dev/zero of=/var/swapfile bs=1024 count=$((1226*1024)); mkswap /var/swapfile"
creates "/var/swapfile"
umask 0077
action :run
end
mount "none" do
action :enable
device "/var/swapfile"
fstype "swap"
options "sw"
end
execute "swapon -a"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment