I would love to have each node use a different adapter with a different ip 
address and FQDN. But this vagrant file isn't able to achieve this!!
** New to ruby coding**
Could someone please point me in the right direction




# -*- mode: ruby -*-
# vi: set ft=ruby :
# Every Vagrant development environment requires a box. You can search for
# boxes at https://app.vagrantup.com/boxes/search

BOX_IMAGE = "bento/ubuntu-16.04"
DOMAIN = privatec-d.yourltld
NODE_COUNT = 2

ENV["LC_ALL"] = "en_US.UTF-8"

Vagrant.configure("2") do |config|
  config.vm.provider "virtualbox" do |v|
    v.gui = false
    v.name = "MY-Automan-VM1001"
    v.linked_clone = true
    v.customize ["modifyvm", :id, "--cpuexecutioncap", "50"] 
    v.memory = "1024"
    v.cpuhotplug = on
    v.cpus = 2
  end

  config.vm.define "master" do |subconfig|
    subconfig.vm.box = BOX_IMAGE
    #subconfig.vm.box_url = "file://QvagrantBoxes/BOX_IMAGE.box" // for 
local vagrant box
    subconfig.vm.hostname = "master.DOMAIN"
    #subconfig.vm.forwarded_port 80, 8080, auto_correct: true protocol: 
"udp" protocol: "tcp"
    #subconfig.vm.usable_port_range = (2200..2250)
    subconfig.vm.network "private_network", type: "dhcp", ip: 
"fde4:8dba:82e1::c125" :adapter => 4
  end

  (1..NODE_COUNT).each do |i|
    config.vm.provider "virtualbox" do |vb|
      vb.name = "node#{i.NewVM1001}"
    end
    config.vm.define "node#{i}" do |subconfig|
      subconfig.vm.box = BOX_IMAGE
      subconfig.vm.hostname = "node#{i}.DOMAIN" 
      #subconfig.vm.forwarded_port 80, 8080, auto_correct: true protocol: 
"udp" protocol: "tcp"
      #subconfig.vm.usable_port_range = (2200..2250)
      subconfig.vm.network "private_network", type: "dhcp", ip: 
"fde4:8dba:82e1::#{i+c125}" :adapter ==> 5
    end
  end

  config.vm.provision "shell", inline: <<-SHELL
    apt-get install -y avahi-daemon libnss-mdns
    apt-get update
  SHELL

  # config.vm.synced_folder ".", "/vagrant", type: "rsync", rsync__exclude: 
".git/"
  # NFS has issues with WINDOWS OS
  # config.vm.synced_folder ".", "/vagrant", type: "nfs", mount_options: 
['actimeo=2']

end

-- 
This mailing list is governed under the HashiCorp Community Guidelines - 
https://www.hashicorp.com/community-guidelines.html. Behavior in violation of 
those guidelines may result in your removal from this mailing list.

GitHub Issues: https://github.com/hashicorp/vagrant/issues
Discuss: https://discuss.hashicorp.com/c/vagrant/24
--- 
You received this message because you are subscribed to the Google Groups 
"Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vagrant-up+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vagrant-up/a81ed8ad-9451-49bf-8849-913a59dcaf6f%40googlegroups.com.

Attachment: Vagrantfile
Description: Binary data

Reply via email to