-
Notifications
You must be signed in to change notification settings - Fork 0
/
Vagrantfile
49 lines (41 loc) · 1.59 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
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.hostname = "neos-dev"
config.vm.box = "mocdk/debian-puppet-typo3"
config.vm.network :private_network, ip: "192.168.66.80"
config.vm.network "public_network"
config.ssh.forward_agent = true
config.vm.provision "puppet" do |puppet|
puppet.module_path = "modules"
end
config.vm.provider "virtualbox" do |v|
v.memory = 1024
v.cpus = 2
end
config.vm.provider "vmware_fusion" do |v|
v.memory = 1024
v.cpus = 2
v.gui = false
end
# Check if ~/.gitconfig exists locally
# If so, copy basic Git Config settings to Vagrant VM
if File.exists?(File.join(Dir.home, ".gitconfig"))
git_name = `git config user.name` # find locally set git name
git_email = `git config user.email` # find locally set git email
# set git name for 'vagrant' user on VM
config.vm.provision :shell, :inline => "echo 'Saving local git username to VM...' && sudo -i -u vagrant git config --global user.name '#{git_name.chomp}'"
# set git email for 'vagrant' user on VM
config.vm.provision :shell, :inline => "echo 'Saving local git email to VM...' && sudo -i -u vagrant git config --global user.email '#{git_email.chomp}'"
end
if File.exists?("config/local-bootstrap.sh")
config.vm.provision :shell, :inline => "echo ' > > > running config/local_bootstrap.sh'"
config.vm.provision :shell, :path => "config/local-bootstrap.sh"
end
config.trigger.after :up do
run "./mountNfs.sh"
end
config.trigger.before :halt do
run "./unmountNfs.sh"
end
end