Last active
November 24, 2016 23:33
-
-
Save evertontrindade/76740abd0430ec85f70011cdfc36a1f8 to your computer and use it in GitHub Desktop.
Vagrant file example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
so_name="so" \ | |
app_name="app" app_ip="192.168.56.10" \ | |
bd01_name="bd01" bd01_ip="192.168.56.11" \ | |
bd02_name="bd02" bd02_ip="192.168.56.12" \ | |
vagrant up |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
so_name="so" \ | |
app_name="app" \ | |
bd01_name="bd01" \ | |
bd02_name="bd02" \ | |
vagrant destroy --force |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
$script = <<SCRIPT | |
IDTEAMVIEWER=$(/usr/bin/teamviewer --info) | |
echo $IDTEAMVIEWER | |
SCRIPT | |
Vagrant.configure("2") do |config| | |
config.vm.define ENV['app_name'] do |app| | |
app.vm.box = "app-base" | |
app.vm.synced_folder ".", "/vagrant", disabled: true | |
app.vm.network "private_network", ip: ENV['app_ip'] | |
end | |
config.vm.define ENV['bd01_name'] do |bd01| | |
bd01.vm.box = "bd-base" | |
bd01.vm.synced_folder ".", "/vagrant", disabled: true | |
bd01.vm.network "private_network", ip: ENV['bd01_ip'] | |
end | |
config.vm.define ENV['bd02_name'] do |bd02| | |
bd02.vm.box = "bd-base" | |
bd02.vm.synced_folder ".", "/vagrant", disabled: true | |
bd02.vm.network "private_network", ip: ENV['bd02_ip'] | |
end | |
config.vm.define ENV['so_name'] do |so| | |
so.vm.box = "so-base" | |
so.vm.provider :virtualbox do |vb| | |
vb.customize ["modifyvm", :id, "--macaddress1", "auto"] | |
vb.customize 'post-boot', ["controlvm", :id, "setvideomodehint", "1440", "900", "32"] | |
end | |
so.vm.synced_folder ".", "/vagrant", disabled: true | |
so.vm.provision "shell", inline: $script, args: ["ENV['so_name']"] | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment