Copied from the puppet 3 cookbook site