-
Notifications
You must be signed in to change notification settings - Fork 0
/
Vagrantfile
40 lines (34 loc) · 986 Bytes
/
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
# -*- mode: ruby -*-
# vi: set ft=ruby :
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# Default config
config.vm.box = "precise64"
config.vm.box_url = "http://files.vagrantup.com/precise64.box"
config.vm.synced_folder "salt/roots/", "/srv/"
$script1 = <<SCRIPT
if grep -qv salt /etc/hosts; then
echo "127.0.0.1 salt" >> /etc/hosts
fi
SCRIPT
config.vm.provision :shell, :inline => $script1
config.vm.provision :salt do |salt|
salt.install_master = false
salt.run_highstate = false
salt.verbose = true
end
$script2 = <<SCRIPT
apt-get install git -y
cd /srv/salt
./setupsalt-minion
salt-call state.highstate
cd /var/www/healthroundme/
#~/.virtualenvs/healthgeist/bin/pip install django_extensions
./manage.py syncdb --noinput
./manage.py migrate
SCRIPT
config.vm.provision :shell, :inline => $script2
end
Vagrant::Config.run do |config|
config.vm.forward_port 80, 8080
end