Accessing host-X information from within a Vagrantfile

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Accessing host-X information from within a Vagrantfile

Nick Downs
I am building a multi-node load testing Vagrantfile using vagrant-aws. What I would like to do is setup a "server" within one host configure block then grab a reference to that created VM and gather information from it that I can place into chef_json attributes in subsequent host configuration blocks. 

Something like:

config.vm.define :server do |server|
  server.vm.box = "server"
end

config.vm.define :client do |client|
  server.vm.box = "client"
  server = some_method_that_gives_me_the_server_vm_object("server")
  chef.join = { "server_ip" => server.getip() }
end

Is there functionality for this already? 

nickd

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