#server box
config.vm.define "server" do |server|
server.vm.box = "alvaro/oracle6-dev-491"
server.vm.hostname = "server"
ip="192.168.10.10"
server.vm.network "private_network", ip: ip
end
#agent box
(1..2).each do |i|
vm_name = "agent#{i}"
config.vm.define vm_name do |agent|
agent.vm.box = "alvaro/oracle6-agent"
agent.vm.hostname = vm_name
ip="192.168.10.#{10+i}"
agent.vm.network "private_network", ip: ip
end
end
Once the Vagrantfile is in place, vagrant status will check for all the boxes. ie:
mini:dev_consul kikitux$ vagrant status
Current machine states:
server not created (vmware_fusion)
agent1 not created (vmware_fusion)
agent2 not created (vmware_fusion)
This environment represents multiple VMs. The VMs are all listed
above with their current state. For more information about a specific
VM, run `vagrant status NAME`.
mini:dev_consul kikitux$
Is it possible to bring up multiple machines, with an embedded (./include/Vagrantfile)?And if this is supported - what are the vagrant [init/add/up] steps? For example usually when you do vagrant up - you have to --name the VM - but there are multiple VM's defined in the Vagrantfile. Similar for vagrant init - it either does a default or expects a machine(vm) name.
--
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/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
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+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/b91c53ea-b097-4fe2-8239-9e9afc3c12ad%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.