diff --git a/Vagrantfile b/Vagrantfile index d497545f96da41c57a5e899d4c7ff3c5123f38ae..5761dc35fd3e9d5e1ef6779913f9b4492199c87a 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -3,6 +3,16 @@ # Vagrantfile API/syntax version. Don't touch unless you know what you're doing! VAGRANTFILE_API_VERSION = "2" +HOSTNAME=`hostname -s` +isLocalMode=true + +if HOSTNAME.strip.eql? "dbis-w65107" +# puts "Server mode" + isLocalMode=false +else +# puts "Local mode" + isLocalMode=true +end Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| # Enable vagrant-cachier plugin @@ -27,7 +37,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| config.vm.synced_folder "etc/vagrant/img", "/setup/img" # Setup environment on startup (done using a shell script) - config.vm.provision "shell", path: "etc/vagrant/bootstrap.sh", args: ["niko", "secretPhdPassword#2014!", "true"] + config.vm.provision "shell", path: "etc/vagrant/bootstrap.sh", args: ["niko", "secretPhdPassword#2014!", (isLocalMode ? "true" : "false")] # Network configuration config.vm.network :forwarded_port, guest: 8080, host: 8080, auto_correct: true, id: "tomcat"