Thank you, that makes sense! On Friday, 17 November 2017 00:14:03 UTC+13, Alvaro Miranda Aguilera wrote: > > Hello > > lets say your user is home is /home/user > > and you have a project like this > > /home/user/myproject > > Vagrant home directory will be > > /home/user/.vagrant.d > > The box or your setup can include multiples Vagrantfiles that are all read > and joined in memory > > /home/user/myproject/Vagrantfile # this is your local project > Vagrantfile, things here are used only is this local project > > /home/user/.vagrant.d/boxes/<box>/<version/provider>/Vagrantfile # this > is your box Vagrantfile , will be used in all the projects that use this > box. > > /home/user/.vagrant.d/Vagrantfile # this is your global Vagrantfile , > will be used in all the projects > > > https://www.vagrantup.com/docs/vagrantfile/#lookup-path > > > Seems you are right that the box one is not in the documentation. > Will check and came back with something. > > > > When a box includes a Vagrantfile, its to set something at box level, say > you don't want to use Virtualbox shared folder and want to use/force rsync. > > > Thats the one that packer can include. > > ie: > > $ find ~/.vagrant.d/boxes/ -name Vagrantfile > > /c/Users/kikitux/.vagrant.d/boxes/bento-VAGRANTSLASH-ubuntu-16.04/201708.22.0/virtualbox/Vagrantfile > > /c/Users/kikitux/.vagrant.d/boxes/centos-VAGRANTSLASH-7/1611.01/virtualbox/Vagrantfile > > /c/Users/kikitux/.vagrant.d/boxes/ferventcoder-VAGRANTSLASH-win2012r2-x64-nocm/1.0.0/virtualbox/Vagrantfile > > /c/Users/kikitux/.vagrant.d/boxes/hashicorp-VAGRANTSLASH-precise64/1.1.0/virtualbox/Vagrantfile > > /c/Users/kikitux/.vagrant.d/boxes/iseo_tech-VAGRANTSLASH-CentOS-7-x86_64-DVD-1503-01/7.1.1/virtualbox/Vagrantfile > /c/Users/kikitux/.vagrant.d/boxes/oraclelinux7/0/virtualbox/Vagrantfile > > /c/Users/kikitux/.vagrant.d/boxes/ubuntu-VAGRANTSLASH-trusty64/20171026.0.0/virtualbox/Vagrantfile > > > > example of utilization: > > $ cat > /c/Users/kikitux/.vagrant.d/boxes/centos-VAGRANTSLASH-7/1611.01/virtualbox/Vagrantfile > Vagrant.configure("2") do |config| > config.vm.base_mac = "525400225b53" > config.vm.synced_folder ".", "/vagrant", type: "rsync" > end > > > > > > > Alvaro. > > On Thu, Nov 16, 2017 at 6:26 AM, <[email protected] <javascript:>> wrote: > >> This page <https://www.vagrantup.com/docs/boxes/format.html> on vagrant >> file format tells us: >> >> Today, there are three different components: >>> >>> - >>> >>> Box File - This is a compressed (tar, tar.gz, zip) file that is >>> specific to a single provider and can contain anything. Vagrant core >>> does >>> not ever use the contents of this file. Instead, they are passed to the >>> provider. Therefore, a VirtualBox box file has different contents from a >>> VMware box file and so on. >>> - >>> >>> Box Catalog Metadata - This is a JSON document (typically exchanged >>> during interactions with HashiCorp's Vagrant Cloud >>> <https://www.vagrantup.com/docs/vagrant-cloud>) that specifies the >>> name of the box, a description, available versions, available providers, >>> and URLs to the actual box files (next component) for each provider and >>> version. If this catalog metadata does not exist, a box file can still >>> be >>> added directly, but it will not support versioning and updating. >>> - >>> >>> Box Information - This is a JSON document that can provide >>> additional information about the box that displays when a user runs >>> vagrant >>> box list -i. More information is provided here >>> <https://www.vagrantup.com/docs/boxes/info.html>. >>> >>> Note, how vargrantfile is not mentioned anywhere in this description or >> elsewhere on the page. >> >> Yet, if we read this page >> <https://www.packer.io/docs/post-processors/vagrant.html> from packer >> documentation we can read: >> >> vagrantfile_template >>> <https://www.packer.io/docs/post-processors/vagrant.html#vagrantfile_template> >>> (string) >>> - Path to a template to use for the Vagrantfile that is packaged with the >>> box. >> >> >> This implies that a vagrantfile can indeed be packaged with the box. >> >> How does this work? Why one includes vagrantfile with a box and how this >> vagrantfile is used and how it interact with the normal vagrantfile which >> we are using with `vagrant up`? >> >> -- >> 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 [email protected] <javascript:>. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/vagrant-up/0248837a-7d7d-484d-8786-e8664b3e8eff%40googlegroups.com >> >> <https://groups.google.com/d/msgid/vagrant-up/0248837a-7d7d-484d-8786-e8664b3e8eff%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> For more options, visit https://groups.google.com/d/optout. >> > > > > -- > Alvaro > >
-- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/292df577-b03c-4a8d-89e6-907295f48727%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
