Better hostnames. Got the name of the box and the host-computer. Code duplication. If someone finds out how to do this more elegantly I'll by him a drink of choice
This commit is contained in:
parent
19fa6e547e
commit
20344e2552
1 changed files with 10 additions and 1 deletions
11
vagrantSandbox/Vagrantfile
vendored
11
vagrantSandbox/Vagrantfile
vendored
|
@ -4,7 +4,7 @@
|
||||||
Vagrant.configure("2") do |config|
|
Vagrant.configure("2") do |config|
|
||||||
config.vm.synced_folder "..", "/FOAM-sources"
|
config.vm.synced_folder "..", "/FOAM-sources"
|
||||||
|
|
||||||
config.vm.hostname="vagrant"+ (ENV["HOSTNAME"] || `hostname`.strip)
|
config.vm.hostname="vagrant."+ (ENV["HOSTNAME"] || `hostname`.strip)
|
||||||
|
|
||||||
nrCPU=1
|
nrCPU=1
|
||||||
if ENV["WM_VAGRANT_CPUS"]
|
if ENV["WM_VAGRANT_CPUS"]
|
||||||
|
@ -36,6 +36,7 @@ Vagrant.configure("2") do |config|
|
||||||
s.args = "trusty"
|
s.args = "trusty"
|
||||||
s.path = "initUbunutuScript.sh"
|
s.path = "initUbunutuScript.sh"
|
||||||
end
|
end
|
||||||
|
trusty.vm.hostname="trusty."+config.vm.hostname
|
||||||
end
|
end
|
||||||
|
|
||||||
# default
|
# default
|
||||||
|
@ -47,6 +48,7 @@ Vagrant.configure("2") do |config|
|
||||||
s.args = "precise"
|
s.args = "precise"
|
||||||
s.path = "initUbunutuScript.sh"
|
s.path = "initUbunutuScript.sh"
|
||||||
end
|
end
|
||||||
|
precise.vm.hostname="precise."+config.vm.hostname
|
||||||
end
|
end
|
||||||
|
|
||||||
config.vm.define :centos65 do |centos65|
|
config.vm.define :centos65 do |centos65|
|
||||||
|
@ -57,6 +59,7 @@ Vagrant.configure("2") do |config|
|
||||||
s.args = "centos65"
|
s.args = "centos65"
|
||||||
s.path = "initCentOSRHELScript.sh"
|
s.path = "initCentOSRHELScript.sh"
|
||||||
end
|
end
|
||||||
|
centos65.vm.hostname="centos65."+config.vm.hostname
|
||||||
end
|
end
|
||||||
|
|
||||||
# legacy
|
# legacy
|
||||||
|
@ -67,6 +70,7 @@ Vagrant.configure("2") do |config|
|
||||||
s.args = "lucid"
|
s.args = "lucid"
|
||||||
s.path = "initUbunutuScript.sh"
|
s.path = "initUbunutuScript.sh"
|
||||||
end
|
end
|
||||||
|
lucid.vm.hostname="lucid."+config.vm.hostname
|
||||||
end
|
end
|
||||||
|
|
||||||
#legacy
|
#legacy
|
||||||
|
@ -77,6 +81,7 @@ Vagrant.configure("2") do |config|
|
||||||
s.args = "lucid"
|
s.args = "lucid"
|
||||||
s.path = "initUbunutuScript.sh"
|
s.path = "initUbunutuScript.sh"
|
||||||
end
|
end
|
||||||
|
maverick.vm.hostname="maverick."+config.vm.hostname
|
||||||
end
|
end
|
||||||
|
|
||||||
# experimental
|
# experimental
|
||||||
|
@ -91,6 +96,7 @@ Vagrant.configure("2") do |config|
|
||||||
end
|
end
|
||||||
freebsd92.vm.synced_folder "..", "/FOAM-sources", type: "rsync", rsync__exclude: "vagrantSandbox/"
|
freebsd92.vm.synced_folder "..", "/FOAM-sources", type: "rsync", rsync__exclude: "vagrantSandbox/"
|
||||||
freebsd92.vm.synced_folder ".", "/vagrant", type: "rsync", rsync__exclude: "ccache4vm/"
|
freebsd92.vm.synced_folder ".", "/vagrant", type: "rsync", rsync__exclude: "ccache4vm/"
|
||||||
|
freebsd92.vm.hostname="freebsd92."+config.vm.hostname
|
||||||
end
|
end
|
||||||
|
|
||||||
# legacy/experimental
|
# legacy/experimental
|
||||||
|
@ -112,6 +118,8 @@ Vagrant.configure("2") do |config|
|
||||||
|
|
||||||
# use NFS for the synced folder
|
# use NFS for the synced folder
|
||||||
freebsd10.vm.synced_folder "..", "/FOAM-sources", :nfs => true
|
freebsd10.vm.synced_folder "..", "/FOAM-sources", :nfs => true
|
||||||
|
|
||||||
|
freebsd10.vm.hostname="freebsd10."+config.vm.hostname
|
||||||
end
|
end
|
||||||
|
|
||||||
# legacy
|
# legacy
|
||||||
|
@ -122,6 +130,7 @@ Vagrant.configure("2") do |config|
|
||||||
s.args = "opensuse12"
|
s.args = "opensuse12"
|
||||||
s.path = "initOpenSUSEScript.sh"
|
s.path = "initOpenSUSEScript.sh"
|
||||||
end
|
end
|
||||||
|
opensuse12.vm.hostname="opensuse12."+config.vm.hostname
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
Reference in a new issue