On Thu, Feb 5, 2015 at 11:26 PM, Nicola <[email protected]> wrote:
> config.vm.hostname = "vagrant_dev#{rand(01..99)}.local.domain}"

Yeah that works, you have an extra } at the end.

take note the Vagrantfile is read top to botton and when you start
using blocks the vagrantfile can be read serveral times, specially if
you later puts loops, etc

so I would use something like this to make sure the name is set once
for each read, so the variable have the same value if you end using
that on multiples lines of the Vagrantfile later

Vagrant.configure(2) do |config|
  vm_name ||= "vagrant_dev#{rand(01..99)}.local.domain"
  config.vm.box = "kikitux/oracle6"
  config.vm.hostname = vm_name
end

Alvaro

-- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to