domain = 'largo.lan'
nodes = [ { :hostname => 'ans01', :ip => '192.168.56.211', :fwd_http_port => '8080', fwd_https_port => '8443', :box => 'generic/ubuntu1804' }, { :hostname => 'ans02', :ip => '192.168.56.212', :fwd_http_port => '8081', fwd_https_port => '8444', :box => 'generic/ubuntu1804' }, { :hostname => 'ans03', :ip => '192.168.56.213', :fwd_http_port => '8082', fwd_https_port => '8445', :box => 'generic/ubuntu1804' },]
Vagrant.configure("2") do |config| nodes.each do |node| config.vm.define node[:hostname] do |nodeconfig| nodeconfig.vm.box = node[:box] nodeconfig.vm.provision "shell", path: "vagrant_scripts/post_box_build.sh" nodeconfig.vm.hostname = node[:hostname] + ".box" nodeconfig.vm.network :private_network, ip: node[:ip] nodeconfig.vm.network "forwarded_port", guest: 80, host: node[:fwd_http_port] nodeconfig.vm.network "forwarded_port", guest: 443, host: node[:fwd_https_port] nodeconfig.vm.boot_timeout = 600 memory = node[:ram] ? node[:ram] : 512; nodeconfig.vm.provider :virtualbox do |vb| vb.linked_clone = true vb.customize [ "modifyvm", :id, "--cpuexecutioncap", "50", "--memory", memory.to_s, "--vram", "12", "--natdnshostresolver1", "on", ] end end endend
$ vagrant upVagrant failed to initialize at a very early stage:
There was an error loading a Vagrantfile. The file being loadedand the error message are shown below. This is usually caused bya syntax error.
Path: /home/neil/git/ansible_test/VagrantfileLine number: 10Message: NameError: undefined local variable or method `fwd_https_port' for main:Object$ --
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/839f7fff-a936-45e8-a2b2-295b3e161901%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to vagra...@googlegroups.com.