-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathVagrantfile
66 lines (58 loc) · 1.65 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# encoding: utf-8
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vbguest.auto_update = true
config.vm.box = "precise64.box"
config.vm.box_url = "http://files.vagrantup.com/precise64.box"
config.ssh.forward_agent = true
config.vm.synced_folder "NodeServer/", "/NodeServer/"
config.vm.synced_folder "NodeClient/", "/NodeClient/"
config.vm.synced_folder "Setup/", "/Setup/"
config.vm.network "private_network", ip: "10.10.23.23"
config.vm.provision :shell, :inline => "if [[ ! -f /apt-get-run ]]; then sudo apt-get update && sudo touch /apt-get-run; fi"
config.vm.provision :chef_solo do |chef|
chef.cookbooks_path = ["cookbooks"]
chef.add_recipe :apt
chef.add_recipe 'vim'
chef.add_recipe 'git'
chef.add_recipe 'postgresql::server'
chef.json = {
:git => {
:prefix => "/usr/local"
},
:postgresql => {
:config => {
:listen_addresses => "*",
:port => "5432"
},
:pg_hba => [
{
:type => "local",
:db => "postgres",
:user => "postgres",
:addr => nil,
:method => "trust"
},
{
: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"
}
],
:password => {
:postgres => "pw"
}
}
}
end
end