-
Notifications
You must be signed in to change notification settings - Fork 0
/
Vagrantfile
43 lines (42 loc) · 1.39 KB
/
Vagrantfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
Vagrant.configure("2") do |config|
config.vm.box = "precise64"
config.vm.box_url = "http://files.vagrantup.com/precise64.box"
config.omnibus.chef_version = :latest
config.vm.define "database" do |cfg|
cfg.vm.network "forwarded_port", guest: 5432, host: 5432
cfg.vm.provision :chef_solo do |chef|
chef.provisioning_path = "/tmp/vagrant-chef-solo"
chef.file_cache_path = chef.provisioning_path
chef.cookbooks_path = "cookbooks"
chef.add_recipe("apt")
chef.add_recipe("postgresql::server")
chef.json = {
:postgresql => {
:users => [
{
:username => "vagrant",
:password => "password",
:superuser => true,
:createdb => true,
:login => true
}
],
:databases => [
{
:name => "vagrant",
:owner => "vagrant",
:template => "template0",
:encoding => "utf8",
:locale => "en_US.UTF8"
}
],
:pg_hba => [
{:type => 'host', :db => 'all', :user => 'all', :addr => '0.0.0.0/0', :method => 'md5'},
{:type => 'host', :db => 'all', :user => 'all', :addr => '::1/0', :method => 'md5'}
],
:listen_addresses => '*'
}
}
end
end
end