Hey, folks! That's much to all the Hashicorp folks and Vagrant contributors. I've been working more with Vagrant lately, and I'm repeatedly surprised at how well the API works. Appreciate it!
This may be in the documentation. If so, I couldn't find it, and mea culpa. Let's say you're using multiple VMs. For example, say there are two (different) app servers and a DB server. We want these to be compatible with both VirtualBox and AWS provisioners, so we won't always have an IP address of 127.0.0.1 that works. When you're writing a top-level config.vm.provision or config.push block in your Vagrantfile, is there any way to tell which VM it's being invoked for? For instance, it would be nice to be able to write a top-level Chef provisioner that loaded the config out of a JSON file, but used a different JSON file for each app server. But then it would need to know which VM it was being called for, to load the right JSON file. Should it just be multiple provisioner blocks, one inside each config.vm block? Similarly for the pusher -- say you had a top-level config.push block that knew how to parse "vagrant ssh-info" and call Capistrano -- it would still need to know which app server it was being called for so that it could call ssh-info for the correct app server. Any hints? Or is the right answer to just put the Provisioner and Pusher blocks inside the config.vm blocks and maybe wind up with a bit of duplicate code? -- 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.
