Created
July 12, 2019 06:45
-
-
Save dmitry-lyutenko/532aea3b29e5ca9b7b5cc2011ae96faa to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| INTENT_TYPE="internal-net" | |
| MACHINES = { | |
| :"gl1" => { | |
| :box_name => "centos/7", | |
| :net => [ | |
| {ip: '10.10.10.11', adapter: 2, netmask: "255.255.255.0"}, | |
| {ip: '10.12.12.1', adapter: 3, netmask: "255.255.255.0", virtualbox__intnet: INTENT_TYPE}, | |
| ], | |
| :cpus => 1, | |
| :memory => 256, | |
| :default_gw => "10.10.10.1" | |
| }, | |
| :"gl2" => { | |
| :box_name => "centos/7", | |
| :net => [ | |
| {ip: '10.10.10.12', adapter: 2, netmask: "255.255.255.0"}, | |
| {ip: '10.12.12.2', adapter: 3, netmask: "255.255.255.0", virtualbox__intnet: INTENT_TYPE}, | |
| ], | |
| :cpus => 1, | |
| :memory => 256, | |
| :default_gw => "10.10.10.1" | |
| }, | |
| } | |
| Vagrant.configure("2") do |config| | |
| MACHINES.each do |boxname, boxconfig| | |
| config.vm.define boxname do |box| | |
| box.vm.box = boxconfig[:box_name] | |
| box.vm.host_name = boxname.to_s | |
| boxconfig[:net].each do |ipconf| | |
| box.vm.network "private_network", ipconf | |
| end | |
| box.vm.provider "virtualbox" do |v| | |
| v.memory = boxconfig[:memory] | |
| v.cpus = boxconfig[:cpus] | |
| end | |
| end | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment