Skip to content

Instantly share code, notes, and snippets.

@andredumas
andredumas / datetime.rb
Created March 18, 2014 03:30
Chef port of datetime puppet manifest (https://gist.github.com/andredumas/9612907)
package "language-pack-en" do
action :install
end
package "tzdata" do
action :install
end
link "/etc/localtime" do
to "/usr/share/zoneinfo/Australia/Melbourne"
@andredumas
andredumas / swap.pp
Last active August 29, 2015 13:57
Online note of a manifest I regularly use to create swap on AWS EC2 Ubuntu instances.
exec { "mkswap":
command => "dd if=/dev/zero of=/swap bs=1024 count=$((1226*1024)); mkswap /var/swapfile",
creates => "/var/swapfile"
}
file { "/var/swapfile":
ensure => present,
mode => 600,
require => Exec["mkswap"]
}
@andredumas
andredumas / datetime.pp
Last active August 29, 2015 13:57
Online note of a manifest I regularly use to set date, time and timezone information on ubuntu hosts. Works on vagrant box precise64 (http://files.vagrantup.com/precise64.box) and AWS EC2 Ubuntu instances.
# Make sure you apt-get update before applying this.
package { "language-pack-en":
ensure => latest
}
package { "tzdata":
ensure => latest
}