As Alvaro outlined, the inheritance ordering is very static. It will always load the farthest/highest Vagrantfile first, and then the closer/more specific Vagrantfiles later.
If you define a variable at the ~/.vagrant.d/ level it will persist into the project's Vagrantfile load as well. A simple way to watch this is to define the VAGRANTFILE_API_VERSION in a "higher" Vagrantfile, and see the warnings at the VM/project level when it has already been defined. On Saturday, April 25, 2015 at 10:48:57 AM UTC-5, Dalibor Karlović wrote: > > Hello, > > I have a custom box which contains a embedded Vagrantfile (let's call it > VF1). This file contains a lot of box-specific config / functionality and > the target is I should be (and am) able to generate the project Vagrantfile > (VF2) just with: > > Vagrant.configure(2) do |config| > config.vm.box = "my/box" > end > > and still get all the functionality (Puppet integration, VirtualBox > tweaks, YAML config support, etc). The problem is that I'd like to read > files relative to VF2 from VF1. The way I see it, VF2 gets loaded before > VF1 and thus, Vagrant should be able to figure out where VF2 is before > loading loading VF1. So, how do I access this information? > > Thanks in advance. > -- 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.
