Skip to content

Instantly share code, notes, and snippets.

@sharnik
Created January 13, 2014 10:34
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sharnik/8397941 to your computer and use it in GitHub Desktop.
Save sharnik/8397941 to your computer and use it in GitHub Desktop.
site :opscode
cookbook 'apt'
cookbook 'database'
cookbook 'set_locale', path: './cookbooks/set_locale'
cookbook 'postgresql_server_utf8', path: './cookbooks/postgresql_server_utf8'
require 'berkshelf/vagrant'
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# Every Vagrant virtual environment requires a box to build off of.
config.vm.box = "precise32"
# Use Berksfile
config.berkshelf.enabled = true
# Enable provisioning with chef solo, specifying a cookbooks path, roles
# path, and data_bags path (all relative to this Vagrantfile), and adding
# some recipes and/or roles.
config.vm.provision :chef_solo do |chef|
chef.add_recipe 'apt'
chef.add_recipe 'locale'
chef.add_recipe 'postgresql_server_utf8'
chef.json = {
'postgresql' => {
'version' => '9.1',
'initdb_locale' => 'en_US.UTF-8',
'password' => {'postgres' => 'mysuperfancypassword'},
'config' => {
'lc_messages' => 'en_US.UTF-8',
'lc_monetary' => 'en_US.UTF-8',
'lc_numeric' => 'en_US.UTF-8',
'lc_time' => 'en_US.UTF-8'
}
}
}
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment